bucky5933
Posts: 2
Joined: Sun Sep 26, 2021 11:03 pm

columnrange lineargradient series line up

Basically, I want the color gradients to line up for the entire series. In this example,
https://jsfiddle.net/ynrcw147/
i want the last column to range from yellow to green (since green is the middle stop and the rightmost endpoint of the last column is very near the midpoint of where i want the gradient to be. In this example, we're dealing with temperatures. i want to display all the cold temps as yellow, all the medium temps at green and all the high temps as red relative to the bottom axis shared by all the columns. how can i align the gradient for ALL columns?

Thanks!
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: columnrange lineargradient series line up

Hi,

Welcome to our forum and thanks for contacting us with your question!

There is no such approach in the API currently, but there is a workaround for it. The only disadvantage of this solution is the lack of responsiveness. Here is the demo with your example:

Demo
https://jsfiddle.net/BlackLabel/abkcu9zf/

Feel free to ask any further questions!
Regards!
Magdalena Gut
Developer and Highcharts Support Engineer
bucky5933
Posts: 2
Joined: Sun Sep 26, 2021 11:03 pm

Re: columnrange lineargradient series line up

This is actually fantastic! My chart is already width-limited, so loss of responsiveness is not that big of a deal in this case. Thanks!
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: columnrange lineargradient series line up

You're welcome! In case of any further questions, feel free to contact us again.
Magdalena Gut
Developer and Highcharts Support Engineer

Return to “Highcharts Usage”