Datageek
Datageek

Reputation: 26699

Highcharts - on zoom start Y axis from 0

After zooming in on the chart I would like the series to move down so they start from 0.

Let's say we have a following report: http://jsfiddle.net/rathko/3c2GH/1/

Now when we zoom we see for example:

enter image description here

Instead I would like to have this serie Y axis to start from 0 rather than from ~17. On zoom-out it should go back to original but whenever user zooms-in it should start from 0 - meaning from all points the initial value should be deducted.

Is this possible with HighCharts?

I found the

startOnTick

but it's not what I was looking for.

Upvotes: 1

Views: 649

Answers (1)

Sebastian Bochan
Sebastian Bochan

Reputation: 37578

I misunderstood, but when we zoom it yAxis begins from 0, but you would like to have from ie. 15, right? if yes you can catch afterSetExtremes event and call setExtremes to set customised range on axis. Second solution is using zoomType as 'xy'

Upvotes: 1

Related Questions