14👍
What you want to remove is probably the border of the chart. In Chart.js v2 I was able to remove this first vertical border by setting drawBorder
to false
for the grid line configuration:
options: {
scales: {
yAxes: [{
gridLines: {
drawBorder: false
}
}]
}
}
In Chart.js docs it is explained in https://www.chartjs.org/docs/latest/axes/styling.html#grid-line-configuration.
- [Chartjs]-Chart.JS Can not read property '_meta' of Undefined
- [Chartjs]-How to show data values in top of bar chart and line chart in chart.js 3
1👍
Try using the chart option, scaleLineColor
, and setting the color to have 0
opacity:
new Chart(ctx).Bar(data, {
scaleLineColor: 'rgba(0, 0, 0, 0)',
});
http://jsfiddle.net/wb3kcunt/33/
If you are using chartjs v2
, then the showBorder option in scales.gridLines
should do the trick:
options: {
scales: {
gridLines: {
showBorder: false,
}
}
}
See docs: http://www.chartjs.org/docs/#scales
Source:stackexchange.com