benjaminz
benjaminz

Reputation: 3228

Unable to set xAxis min for Highstock (Highcharts)

I have a chart very similar to this fiddle below:

http://jsfiddle.net/yse0Lkq2/

And I am trying to set a xAxis.min even if the min has no value (I'm hoping it could show blank white space rather than nothing at all). I tried setting:

    xAxis: {
        min: 1147284425000, 
        minRange: 30 * 1000,
        startOnTick: false,
        endOnTick: false
    }

Hoping that both the chart and the navigator could start with "1147284425000", which equals (GMT): Wed, 10 May 2006 18:07:05 GMT , but I'm not seeing any differences here.

What am I missing here?

Thanks guys!

Upvotes: 0

Views: 101

Answers (2)

Paweł Fus
Paweł Fus

Reputation: 45079

Three things to mention:

  • rangeSelector.selected option prevents min, remove that one
  • xAxis.min is not enough, add also xAxis.max to see the change
  • it won't work until you will set xAxis.ordinal to false. Ordinal option displays points equally on the available space, so there is no place for "empty space"

And working demo: http://jsfiddle.net/yse0Lkq2/1/

Upvotes: 2

MANISH ZOPE
MANISH ZOPE

Reputation: 1201

I am not sure If I am getting your questions completely or not but from what I got is you are trying to set the minimum for navigator. Please try setextreme function. Ref : http://api.highcharts.com/highstock#Axis.setExtremes

Hope that helps Manish

Upvotes: 0

Related Questions