class Geometry · Shapes

Grid

A grid given by its lines: the x positions of the vertical lines and the y positions of the horizontal lines, both sorted. n + 1 lines make n columns (or rows).

A grid is plain data and not reactive. In Reactive.do, list what the grid is computed from (for example the box) as senders, not the grid. Any sorted arrays make a grid, for example axis ticks: { x: [0, 50, 120, 300], y: [0, 100, 200] }. An empty grid { x: [], y: [] } works as the result of the functions that create grids.

Properties

x

x: number[]

The x positions of the vertical lines, sorted.

y

y: number[]

The y positions of the horizontal lines, sorted.