We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A bar is expected to have the zero-line as one of the borders
Bars with negative values start from the zero-line, rather than below it, meaning they lack the top border.
https://jsfiddle.net/winter_limelight/zxd0b81c/9/
Note that the red line is absent from the Mar 18 bar.
var ctx = document.getElementById("chart").getContext('2d'); var chart = new Chart(ctx, { type: 'bar', data: { labels: ['Feb 18', 'Mar 18'], datasets: [{ backgroundColor: '#AAFFCC', borderColor: '#0000FF', borderWidth: 1, data: [1, -1] }] }, options: { scales: { yAxes: [{ gridLines: { zeroLineColor: '#FF0000' }, }] }, maintainAspectRatio: false } });
Setting maintainAspectRatio: true changes the border behaviour, but doesn't fix the issue.
Presently trying to create chart showing historical +ve/-ve percentage changes for a client.
Chart.js version: 2.7.3 Browser name and version: Noted in Chrome 71, Firefox 64.
The text was updated successfully, but these errors were encountered:
This is a bit different in master: https://jsfiddle.net/wkec8d9u/ (still a bug though IMO)
master
Sorry, something went wrong.
Tested master and now the red line is missing on the positive bar https://jsfiddle.net/pqfdrvz3/
dpr: 1
dpr: 1.25
dpr: 2.5
Successfully merging a pull request may close this issue.
Expected Behavior
A bar is expected to have the zero-line as one of the borders
Current Behavior
Bars with negative values start from the zero-line, rather than below it, meaning they lack the top border.
Steps to Reproduce (for bugs)
https://jsfiddle.net/winter_limelight/zxd0b81c/9/
Note that the red line is absent from the Mar 18 bar.
Setting maintainAspectRatio: true changes the border behaviour, but doesn't fix the issue.
Context
Presently trying to create chart showing historical +ve/-ve percentage changes for a client.
Environment
Chart.js version: 2.7.3
Browser name and version: Noted in Chrome 71, Firefox 64.
The text was updated successfully, but these errors were encountered: