Skip to content

GridLineSet

Overview

Draws a set of lines within a graph. For example, the minor horizontal lines. Back-computes the model locations given the view area.

See also CanvasGridLineSet for one that renders to canvas. Note, these 2 files should be maintained together, to keep as similar an API as possible.

@author Sam Reid (PhET Interactive Simulations)

Class GridLineSet

import { GridLineSet } from 'scenerystack/bamboo';

Constructor

new GridLineSet( chartTransform : ChartTransform, axisOrientation : Orientation, spacing : number, providedOptions? : GridLineSetOptions )

Instance Methods

update()

(protected)

setSpacing( spacing : number )

getSpacing() : number

dispose()

getSpacingBorders() : Range

Type GridLineSetOptions

import type { GridLineSetOptions } from 'scenerystack/bamboo';

Source Code

See the source for GridLineSet.ts in the bamboo repository.