Skip to Main Content
Learn Chart.js
book

Learn Chart.js

by Helder da Rocha
February 2019
Beginner to intermediate content levelBeginner to intermediate
284 pages
6h 20m
English
Packt Publishing
Content preview from Learn Chart.js

Configuring grid lines

Cartesian grids support several properties that change their appearance on the screen. You can change colors, line widths, line styles, tick size, spacing for the grid lines, and different styles for the zero line. You can also show and hide grid lines, ticks, and borders, reducing the amount of unnecessary chart junk and making your chart more efficient.

These properties are configured in the gridLines object inside each object of the xAxes or yAxes arrays and are listed here:

Property

Value

Description

display

true (default) or false

Shows or hides the grid lines for this axis.

color

A CSS color or array of colors; default is ‘rgba(0,0,0,.1)’

The color of the grid lines. If an array is used, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro D3.js: Use D3.js to Create Maintainable, Modular, and Testable Charts

Pro D3.js: Use D3.js to Create Maintainable, Modular, and Testable Charts

Marcos Iglesias

Publisher Resources

ISBN: 9781789342482OtherErrata PagePurchase Link