0👍
This is how achieved the color of zero line.
Chart.defaults.scale.gridLines.color = "#FFFFFF"; //white
0👍
Since the line is horizontal it would seem (believe me, I agree with you) that you need to put the zerLineColor
on the xAxes
but you need to put it on the yAxes
yAxes: [
{
gridLines: {
zeroLineColor: '#000',
}
}
]
-1👍
datasets: [{
label: '# of Votes',
data: [12, 19, 3, 5, 2, 3],
borderColor: "rgba(0, 0, 0, 1)",
}]
Check with the above given data sets. It can convert the color of line to black.
- Chartjs-How to create spacing between Charts and Legends in Chart.js
- Chartjs-Chart.js – Same min and max value of two charts
Source:stackexchange.com