Chart.js v2 - hiding grid lines

后端 未结 7 2019
旧时难觅i
旧时难觅i 2020-12-12 15:25

I am using Chart.js v2 to draw a simple line chart. Everything looks fine, except there are grid lines that I don\'t want:

The documentation for Line Chart

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-12 15:59

    The code below removes remove grid lines from chart area only not the ones in x&y axis labels

    Chart.defaults.scale.gridLines.drawOnChartArea = false;
    

提交回复
热议问题