Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added noClipY option #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

SleepProgger
Copy link
Contributor

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 and chartRect.
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.

@SleepProgger
Copy link
Contributor Author

SleepProgger commented Nov 15, 2018

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant