Chart Area changing on pan/zoom #636
Unanswered
cintiapinto
asked this question in
Q&A
Replies: 1 comment
-
This is probably due to scale labels changing and needing different amount of space. options: {
scales: {
x: {
afterFit(scale) {
scale.paddingLeft = 80; // min-width for left side y-axis
}
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!
I have a chart.js graph that takes up my entire screen with
1920x1080
resolution with a70px
padding on the left hand side.When I print out the chart area when the graph is first loaded, it has the values I expect it to:
But when I zoom or pan in the graph using the zoom plugin, the chart area values change to:
This is a problem because it's causing a white border to appear around the chart, which means that the chart is then not taking up the entire screen.
I have
mode: "x"
enabled for both pan and zoom.How can I make sure that the chart area stays set to what it's initialised to?
Is there a setting I could potentially missing or is this a known bug?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions