{}
Chartjs remove gridlines
css
js
html
libs + Add Library
HTML
<div style="width: 500px;"> <canvas id="myChart" width="400" height="200"></canvas> </div>
CSS
JS
var ctx = document.getElementById('myChart').getContext('2d'); var myChart = new Chart(ctx, { type: 'bar', data: { labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple'], datasets: [{ label: '# of Votes', data: [90, 60, 50, 50, 100], backgroundColor: "#00AAFB", }] }, options: { scales: { xAxes: [{ gridLines: { display: false } }], yAxes: [{ ticks: { beginAtZero: true, }, gridLines: { display: false } }] } } });