K.T
Posts: 50
Joined: Tue Aug 16, 2022 3:37 am

Range Selector - Display 1 Day

Hello Highcharts

I would like to display my data so I only shows a minimum of 1 day if that is what has been defined in the Range Selector.
Currently it is showing 5 days which I assume is by default.

Would appreciate your guidance as to how I can when adding in my date range it will display a single day.

https://jsfiddle.net/terryfernz/sczuwydt/20/

Thank you in advance for your support.
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Range Selector - Display 1 Day

Hi,

Thanks for the question.

You can achieve this with xAxis.minRange property.

Just add:

Code: Select all

xAxis: {
	minRange: 24 * 60 * 60 * 1000
}

to your chart config.

API: https://api.highcharts.com/highstock/xAxis.minRange

Let me know if you have any more questions.

Best regards,
Jakub
Jakub
Highcharts Developer

Return to “Highcharts Stock”