Mapantz
Posts: 29
Joined: Tue Nov 05, 2019 12:24 pm

Column range with positive number

Hi

I have two data points that will always have positive numbers. But is it possible to use the negative column range and have positive numbers, from zero, on the y-axis?


4
3
2
1
0
1
2
3
4

Many thanks.
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: Column range with positive number

Thanks for contacting us with your question!

I'm not sure if I understood your problem correctly, so I please let me know if I gave you the information you needed.

If you want the column range to start with 0, simply pass it as a first value of the point eg. [0,xxx].

I prepared a demo for you with reversed yAxis, because that's what I think you want to do. A reversed yAxis is when the values increase from top to bottom, not from bottom to top. If you want to stick with the default layout of the yAxis, simply remove the code from the 13th line.

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

When you want to use 'columnrange' with the first value being 0 for every point, you can use the default 'column' series type and pass only one value to the point, see:

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

Let me know if that was what you were looking for!
If that's not what you meant, please give me a more specified example or a visualization how do you want your chart to look like and than I will be able to give you all the possibilities.

Best regards
Jakub

Return to “Highcharts Stock”