Open SleepProgger opened 5 years ago
Additionally i added an autoscale y axis feature where axisY.highLow is set to the largest/lowest y value which will be displayed.
The corresponding option autoZoomY
supports boolean values to enable both lower and upper bounds scaling and objects like {high: boolean, low: boolean}
to enable only upper or lower bounds scaling.
Demo here: https://jsfiddle.net/k5ov3f7u/5/
This PR adds an option to only clip the x axis which is a common requirement when working with line graphs.
I had to move getRect into the plugin function to be able to access
options
andchartRect
. To keep it consistent i moved all the other functions outside also into the plugin. An alternative would be to do the work in each event callback, but tbh. i don't see any real problem with the functions being inside the plugin.