It is currently Mon Sep 24, 2018 6:53 am Advanced search

How to set right axis beyond max datapoint on a column chart

Technical support for the Highcharts Stock package

How to set right axis beyond max datapoint on a column chart

Postby menlodev » Fri Sep 14, 2018 4:39 pm

Hello,

In this example (http://jsfiddle.net/bp53j9u8/) based on a default Highstock example, I am setting the xAxis max value to Oct 15, 2018. This shows properly in the range filter. However, I would like to show the full three-month range, including dates without data, similar to this example in Highcharts (http://jsfiddle.net/w4ks3e10/). How could I accomplish this?

I also see that if the 1 month range selector is chosen, one month of no data is shown. Is there a way to make the behavior consistent so clicking on a range will always show that length of period of time even if there is no data (eg after selecting a zoom range of 3 months, the x-axis range should be July 15 to Oct 15)?

Thanks for the help
menlodev
 
Posts: 3
Joined: Tue Aug 28, 2018 7:29 pm

Re: How to set right axis beyond max datapoint on a column c

Postby wojtek » Mon Sep 17, 2018 2:15 pm

Hi menlodev,

1. This is caused by xAxis.ordinal which is enabled by default. Set it equal false and you will have what you expected.

Demo:
http://jsfiddle.net/wchmiel/wmt5Lsk2/

Api reference:
https://api.highcharts.com/highstock/xAxis.ordinal

2. If you like to have ordinal enabled you would have to add points with null value to your data collection (to the end of the month).

Demo:
http://jsfiddle.net/wchmiel/Lxgbmp3q/

Kind regards.
Wojciech Chmiel
Highcharts Developer
wojtek
 
Posts: 296
Joined: Tue Jul 03, 2018 2:32 pm


Return to Highstock Usage

Who is online

Users browsing this forum: Bing [Bot] and 0 guests