dev4
dev4

Reputation: 195

Highstock with numbers instead of date in x-axis

I need to output a plot on page, and I'm considering Highstock or Highcharts to implement this. Highstock interface is more preferable due to navigator pane showing the rest of plot after rezooming.

However my plot has numbers in x-asis, but not date/time. Is there any way to use Highstock with numerical x-scale? Or add similar navigator to Highcharts?

Upvotes: 8

Views: 8870

Answers (3)

Zon
Zon

Reputation: 19880

xAxis: {
    type: 'linear' // Other types are "logarithmic", "datetime" and "category"
}, 

Upvotes: 1

user2504837
user2504837

Reputation: 181

Below X Axis formatter can be used with high Stock for displaying numbers in X-Axis:

xAxis: {labels: {   formatter: function () {return this.value;}} }

Upvotes: 18

dgw
dgw

Reputation: 13646

Highstock's only type of xAxis is datetime, so using it with numbers is not an option. (Maybe if you make some tricky formatting actions and define a custom tooltip with the same formatting options it might be possible).

Leaves only Highcharts and there is an example called master-detail chart that could meet your requirements.

Hope that helps.

Upvotes: 8

Related Questions