dansan
Posts: 23
Joined: Mon Nov 28, 2022 2:23 pm

Prevent colorAxis from breaking with many points?

Hi!

I'm using the colorAxis module to color markers on hover, but I'm running into an issue where the colorAxis breaks when using many points.
This happens when setting the navigator zoom between minimum and maximum once or twice. Markers suddenly stop being blue/green/red color and instead revert back to series color.

Is there a way to prevent this from breaking, or am I forced to limit the amount of points?

Example: https://jsfiddle.net/zen9wtax/
(zoom with the navigator a few times for it to break)

PS:
As I'm only using the colorAxis to color my markers, is there maybe a better alternative?
I was thinking maybe I could set the marker fillColor on hover based on where the point value is between yAxis.dataMin and yAxis.dataMax, but is there a way to target a single point marker?
dansan
Posts: 23
Joined: Mon Nov 28, 2022 2:23 pm

Re: Prevent colorAxis from breaking with many points?

I might actually have solved my issue!

I tried to come up with an alternative solution, eg. setting color of points with point.update({ color: '#900' }).
This worked about as well as colorAxis, but this time the console gave me a warning when zooming out: https://assets.highcharts.com/errors/24/

I tried setting dataGrouping to false, and that solved this issue with both these methods!
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: Prevent colorAxis from breaking with many points?

Hi,

Thanks for contacting us with your question!

I'm glad you were able to solve your problem and thanks for sharing the solution.
If any glitches arise please inform me as soon as possible, I'm available at your convenience.

Best regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Stock”