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

Reset zoom does not reset zoom. #82

Open
Jesperi02 opened this issue Sep 10, 2021 · 3 comments
Open

Reset zoom does not reset zoom. #82

Jesperi02 opened this issue Sep 10, 2021 · 3 comments

Comments

@Jesperi02
Copy link

I'm trying to call resetZoom on a button click. I don't like the default button, and would like my "reset zoom" button to be next to the rest of my UI. Looking at chartjs-plugin-crosshair.js i found this:

 chart.crosshair = {
      ...
      reset: function() {
        this.resetZoom(chart, false, false);
      }.bind(this)
    };

So i would assume calling graph.crosshair.reset would call resetZoom and reset the zoom, but that does not happen. The default button does disappear. Loggin graph.crosshair.reset to console gives me function () so i am finding that correctly.

Maybe i've got it all wrong, but i can't seem to figure this out, and any help would be lovely.

@Jesperi02
Copy link
Author

Forgot to mention i'm running chartjs-plugin-crosshair v1.2.0 and Chart.js v3.5.0

@tleperou
Copy link

+1

1 similar comment
@NiTRoeSE
Copy link

+1

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

No branches or pull requests

3 participants