Shawneau
Posts: 2
Joined: Tue Nov 02, 2021 6:10 pm

Forcing Monthly Granularity of Time Scales in Date Range

Hello,

I have a data set (pricing) that has a publishing frequency of monthly (not daily). I was wondering if anyone has implemented charting in the past with a similar constraint while having a calendar date range selector available to the user?

I'm wanting the user to be able to choose down to the year/month but that's as far as they should be able to go in terms of specifying a start or end date.

Any help or examples would be greatly appreciated,

Thanks in advance.
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Forcing Monthly Granularity of Time Scales in Date Range

Hi,

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

It is possible to do something like this using a wrap. I have prepared a wrap that adds the ability to select rangeSelector to pick an only month. When you set rangeSelector.inputType to 'month' and correctly set rangeSelector.inputDateFormat and rangeSelector.inputEditDateFormat as in the demo everything should work.

Demo: https://jsfiddle.net/BlackLabel/ty0qw6gz/
More about wraps: https://www.highcharts.com/docs/extendi ... highcharts

Let me know if that was what you were looking for!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
Shawneau
Posts: 2
Joined: Tue Nov 02, 2021 6:10 pm

Re: Forcing Monthly Granularity of Time Scales in Date Range

michal.f wrote: Fri Nov 05, 2021 4:12 pm Hi,

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

It is possible to do something like this using a wrap. I have prepared a wrap that adds the ability to select rangeSelector to pick an only month. When you set rangeSelector.inputType to 'month' and correctly set rangeSelector.inputDateFormat and rangeSelector.inputEditDateFormat as in the demo everything should work.

Demo: https://jsfiddle.net/BlackLabel/ty0qw6gz/
More about wraps: https://www.highcharts.com/docs/extendi ... highcharts

Let me know if that was what you were looking for!
Best regards!
Excellent Thank you!
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: Forcing Monthly Granularity of Time Scales in Date Range

You're welcome!

Feel free to ask any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Stock”