Skip to content
  1. API
  2. Types
  3. LevelStyle

LevelStyle

Type: object

Visual appearance overrides for a single grid level. Any property left undefined falls back to a built-in default.

Properties

  • color(optional) string Line or dot colour for this level. Default: '#ddd' for minor levels, '#bbb' for the coarsest.
  • dotRadius(optional) number Dot radius in screen pixels. Only used when width is 0. Default: 0 (no dots).
  • stroke(optional) string SVG stroke-dasharray value, e.g. '4 2' for dashed lines. Omit for solid lines.
  • width(optional) number Stroke width in screen pixels (applies to line rendering only). Set to 0 to render dots instead. Default: 1 for minor levels, 2 for the coarsest.