Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
106
rated 0 times [  109] [ 3]  / answers: 1 / hits: 26044  / 8 Years ago, thu, november 10, 2016, 12:00:00

I managed to remove all horizontale lines/rules in my chart using this:



scales: {
xAxes: [{
gridLines: {
display: false
}
}]
}


But I also want to get rid of the rule/bar that represents the Y-axis as well. But I want to keep the labels:



enter



Unfortunately I can't find any option for that. I can only remove the whole axis including labels.



I'm using Chart.js 2.3.


More From » chart.js

 Answers
31

I found a way to remove this line. It's actually called the border of the axis and there's an option for it, see Grid Line Configuration:



scales: {
yAxes: [{
gridLines: {
drawBorder: false,
}
}]
}

[#60112] Tuesday, November 8, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
halie

Total Points: 362
Total Questions: 99
Total Answers: 119

Location: Samoa
Member since Mon, Nov 8, 2021
3 Years ago
;