Norbert Huurnink
Norbert Huurnink

Reputation: 1316

Xaxis set extremes in highstock options

I'm using a highstock column type chart, and I want to set the xAxis extremes with the options.

Basically I'm looking for the options equivalent of the setExtremes method:

this.chart.xAxis[0].setExtremes(null, null)

Upvotes: 0

Views: 368

Answers (1)

ppotaczek
ppotaczek

Reputation: 39149

You can use min and max properties or call setExtremes method after the chart is created.

xAxis: {
    ...,
    min: -10,
    max: 20
}

Live demo: http://jsfiddle.net/BlackLabel/2b9zomxh/

API Reference: https://api.highcharts.com/highcharts/xAxis

Upvotes: 1

Related Questions