Skip to main content

Grid lines

Chart.js v2 (default)

Chart gridlines are customizable by setting attributes on options.scales.<xAxes/yAxes>.gridLines. This configuration is very flexible. For example, you can change the color, size, and style of gridlines (e.g. making them dotted or dashed). See full Gridlines documentation for more.

The example below removes gridlines by setting gridLines.display to false.

Chart.js v3 and v4

Customize gridlines by setting attributes on options.scales.<scaleName>.grid. See the axes styling documentation for more.

The example below removes gridlines by setting grid.display to false.