tommy19524
Posts: 8
Joined: Tue May 15, 2018 7:59 am

Including highcharts-libs in different order causes error

Hello everyone :D,

I'm trying to get the heatmap.js and boost.js to work properly. But sometimes the boost.js does not kick in and therefore the large data of my heatmap can't be processed/rendered quick enough.
It seems, that the order in which each js-file is included matters a lot:

If boost.js is included AFTER heatmap.js the boost function works fine, but i can't use any onClick functions on the chart anymore.
fiddle: https://jsfiddle.net/rpmsvu5k/1/

If boost.js is included BEFORE heatmap.js the boost function does NOT work anymore, but i can use the onClick functionality again...
fiddle: https://jsfiddle.net/rm61dwhc/

Thanks for your help in advance.
Best regards,
Tom
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: Including highcharts-libs in different order causes erro

Hi, tommy19524!

In boost docs https://www.highcharts.com/docs/advance ... ost-module it's written:
Note: Boost should be the last module included. This is because it overrides both standard Highcharts functionality, and functionality in certain modules (namely treemap, heatmap, bubble, and scatter).
Click event isn't working properly while boost is enabled. However, there is a workaround that allows us to find point's halo and then fire a click event (more info you can find here https://github.com/highcharts/highcharts/issues/4569) but it's not supported in heatmap series due to the fact that heatmap is rendered a bit differently in boost module and doesn't have halo. Unfortunately, I don's see any workaround on this at this moment.

Best regards!
Rafal Sebestjanski,
Highcharts Team Lead
tommy19524
Posts: 8
Joined: Tue May 15, 2018 7:59 am

Re: Including highcharts-libs in different order causes erro

Hello Rafal,

thanks for the quick answer. Totally missed that note to boost.js. :mrgreen:

Well then I have to find another way to for the click event i guess. I don't necessarily need to fire the click event via the series tho. Is it maybe possible to bind a click event onto the y-Axis labels? So that, if i work with categories on the y-Axis, i can retrieve the index of the category and fire a click-event according to that?

EDIT: Nvm. I can use the workaround by StefanJelner from your github link! Thank you very much. Problem solved! :)
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: Including highcharts-libs in different order causes erro

Tom,

Of course, it would be possible to add click event onto labels, but I am glad you have already worked it out ;)

Best regards!
Rafal Sebestjanski,
Highcharts Team Lead

Return to “Highcharts Usage”