palnardev
Posts: 2
Joined: Mon Nov 01, 2021 8:59 am

Bar size issue when changing ranges in Highcharts Stock chart

Hi Highcharts.com Team,

I have been trying to create a highchart stock chart with ranges spanning Monday, April 23, 2018 to Monday, November 1, 2021

The issue I am facing is that after the "year" range is selected and then if I go and select the "day" range, the bars get diminished to minuscule size.

I have also created a test fiddle for reproducing this issue

https://jsfiddle.net/ukqg0L6z/

It loads to the "week" by default
Now I select the "1Day". The bars are displayed and the size is correct.

Now I select the "Year". The bar sizes reduce so as to accommodate the year data. This is also correct.

Now I select the "1Day" again. This time the bar sizes are reduced and it gets diminished.

I would appreciate if you could provide any option to get it the right size when the range selection changes from "year" to "1D"

Regards,
Shaan
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Bar size issue when changing ranges in Highcharts Stock chart

Hello palnardev,

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

The problem is caused by data grouping. Change it slightly like in the demo or disable it completely for that specific button.
Demo: https://jsfiddle.net/BlackLabel/burh4eac/

Let me know if that was what you were looking for!
Regards!
Mateusz Bernacik
Highcharts Developer
palnardev
Posts: 2
Joined: Mon Nov 01, 2021 8:59 am

Re: Bar size issue when changing ranges in Highcharts Stock chart

Hello mateusz.b.

Yes. This is was the solution I was looking for. Thanks a lot.

Regards.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Bar size issue when changing ranges in Highcharts Stock chart

You're welcome! In case of any further questions, feel free to contact us again.
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”