HumbleSoftware / Flotr2

Graphs and Charts for Canvas in JavaScript.
http://www.humblesoftware.com/flotr2/
MIT License
2.44k stars 526 forks source link

Auto rescale axis on range change (x/yaxis.min/max) #290

Open Programie opened 10 years ago

Programie commented 10 years ago

I'm trying to auto rescale my chart once I select a range using the mouse.

The Y axis should be recalculated automatically based on the displayed range.

Example: http://www.humblesoftware.com/flotr2/index#!basic-time

If you select a range where the Y axis data is between 0 and 40 the axis should scale to that range instead of keeping the full range.

Example to reproduce: http://jsfiddle.net/ZFBj5/981/