Skip to content

Grid

Control the background grid appearance.

Options

OptionTypeDefaultDescription
griddedbooleantrueShow/hide the grid
gridLineStylesolid|dashedsolidGrid line pattern
sharedAxisZerobooleantrueShare zero label between axes
optimiseSquareSizebooleantrueRound grid sizes for sharper rendering
strictbooleanfalseForce square grid cells

Line Style

ValueDescription
solidContinuous lines
dashedDotted/dashed pattern

No Grid

Set gridded: false for a minimal look:

Shared Axis Zero

When enabled (default), the origin "0" is shared between X and Y axes:

ts
grid: {
    sharedAxisZero: true; // Prevents duplicate "0" labels
}

Type Reference

See GridOptions for full TypeScript definitions.

Released under the ISC License.