You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation, the offset property of a scale on a bar chart should prevent the first and last bar on the chart from being cut off. The docs actually say this is true by default.
Current behavior
First and last bar are cut in half, even when offset is explicitly specified as true.
This primarily seems to happen with every scale type on the x-axis that is not category. This makes bar charts not usable for any axis type outside of category axis in my product.
chart.js version
v3.5.1
Browser name and version
Chrome
Link to your project
No response
The text was updated successfully, but these errors were encountered:
jmtimko5
changed the title
Bar Chart offset Property Does not do anything
Bar Chart offset Property Does not work with time axis type
Mar 3, 2022
jmtimko5
changed the title
Bar Chart offset Property Does not work with time axis type
Bar Chart offset property Does not work with time axis type
Mar 3, 2022
The issue here is that the offsets to keep the bar visible is working with the ticks that were generated before auto skipping is applied. Offsets for a time chart will need to be recomputed after auto skipping
Expected behavior
According to the documentation, the
offset
property of a scale on a bar chart should prevent the first and last bar on the chart from being cut off. The docs actually say this is true by default.Current behavior
First and last bar are cut in half, even when offset is explicitly specified as
true
.Reproducible sample
https://codesandbox.io/s/bar-chart-offset-issue-ofkyer
Optional extra steps/info to reproduce
No response
Possible solution
No response
Context
This primarily seems to happen with every scale type on the x-axis that is not category. This makes bar charts not usable for any axis type outside of category axis in my product.
chart.js version
v3.5.1
Browser name and version
Chrome
Link to your project
No response
The text was updated successfully, but these errors were encountered: