-
Notifications
You must be signed in to change notification settings - Fork 329
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
Zoom go to Infinity on any event on chart #818
Comments
@M-t-t-h Did you find any solution for this?, I've been struggling for hours with this. |
Hy, |
What versions of Chart.js and zoom plugin are you using? What are those |
Sorry I forgot to reply. I realized that I was getting the error because I hadn't defined a 'labels' key in my data object. I was using a format like this: data: {
datasets: [{
data: [{x: 10, y: 20}, {x: 15, y: null}, {x: 20, y: 10}]
}]
} When I added a labels key the error disappeared. My data now looks like this: data: {
datasets: [{
data: [20, 10],
}],
labels: ['a', 'b']
} I'm using chartjs 4.4.6 and zoom 2.0.1 |
Hy,
I get a unexpected zoom on any event on chart.
After analyse, the function getZoomLevel return 'Infinity'.
I tried many way to resolve it with set min/max, check datas, set X, set Y... not solutions.
here my simpliest JS :
I attache you the image of the graph at load VS.
on load :
after any event :
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: