[Possible Bug] Bar Chart doesn't display right border
See original GitHub issueI’m building a bunch of charts for my project and I just noticed an oddity in vertical bar graphs I am not seeing in line charts. The bar charts don’t display the right border. I have tried placing ‘drawBorder: true’ in both Axes but nothing has changed. Is this a bug or am I missing something in the documentation?
Below is my config for the graph
var config = {
type: 'bar',
data: {
labels: xdata,
datasets: [{
label: 'Fake',
data: supply,
borderColor: primary,
backgroundColor: primary
}]
},
options:
{
title: {
display: true,
text: "Fake",
fontSize: 22,
fontStyle: 'bold',
fontColor: '#000000'
},
legend: {
display: false,
position: 'right'
},
layout: {
padding: { left: 10, right: 80, bottom: 10, top: 10 }
},
scales: {
xAxes: [{
gridLines: {
drawBorder: true
},
scaleLabel: {
display: true,
labelString: 'Fake',
fontStyle: 'bold',
fontSize: 16
}
}],
yAxes: [{
ticks: {
min: 0
},
gridLines: {
drawBorder: true
},
scaleLabel: {
display: true,
labelString: 'Fake',
fontStyle: 'bold',
fontSize: 16
}
}]
}
}
};

Notice the line chart with no settings altered for the borders works fine

In fact the bar chart in the documentation has the same issue.

Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Highcharts stacking bar chart border not displaying on right side
Please note: Setting the borderWidth property to higher than 1 works in displaying, but the rightmost border is much thinner than the others....
Read more >Format the bar chart of a Gantt Chart view - Microsoft Support
In the Name field, click the type of Gantt bar (such as Task or Progress) that you want to format, and then click...
Read more >Bar Chart | Chart.js
A bar chart provides a way of showing data values represented as vertical bars. It is sometimes used to show trend data, and...
Read more >Bar Charts | Google Developers
Like all Google charts, bar charts display tooltips when the user hovers over the data. For a vertical version of this chart, see...
Read more >Floating Bars in Excel Charts - Peltier Tech
In a waterfall chart, floating bars (usually vertical) show how contributing ... and use Plus Error Bars for our floating bars (right).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I got ya, I haven’t messed much with multiple same dimension Axes charts so other than a different border property I’m not sure how people with that criteria would like to handle it. A separate border property that only draws if defined and it defaults to undefined makes the most sense to me, off the top of my head though I haven’t looked much into it.
Writing a modification for that would be simple enough if there was an agreed upon data setup (border I’d expect in the options.chartArea.border. I’d personally vote for separate border property that defaults to the same colors as the Axes. I’ll do a pull request and see what people think, as if it modified project code you’d need more feature options like rounding, strokeWidth, joins, etc. For now I’m just using the primary xAxes color so the left & right match with the plugin below to fix the issue.
https://www.chartjs.org/docs/3.7.0/samples/plugins/chart-area-border.html