Kokesh
Kokesh

Reputation: 3263

How to get selected date from highstock?

I am using Highstock to show time based values. I need to get the date range shown in the chart for other purposes. Is there some easy way to get the begin-end values?

Upvotes: 1

Views: 2390

Answers (2)

Andrey Nelubin
Andrey Nelubin

Reputation: 3294

Use getExtremes

var extremes = chart.xAxis[0].getExtremes(),
     start = new Date(extremes.min),
     end   = new Date(extremes.max);

Upvotes: 8

Kokesh
Kokesh

Reputation: 3263

chart.axes[0].dataMax
chart.axes[0].dataMin

Upvotes: 1

Related Questions