Skip to content

SegmentedBarGraphNode

Overview

A node that represents a quantity as a segmented bar graph.

@author John Blanco @author Chris Klusendorf (PhET Interactive Simulations)

Class SegmentedBarGraphNode

import { SegmentedBarGraphNode } from 'scenerystack/scenery-phet';

Constructor

new SegmentedBarGraphNode( numberProperty : TReadOnlyProperty<number>, rangeProperty : TReadOnlyProperty<Range>, providedOptions? : SegmentedBarGraphNodeOptions )

Instance Methods

Type SegmentedBarGraphNodeOptions

import type { SegmentedBarGraphNodeOptions } from 'scenerystack/scenery-phet';
  • width?: number
  • height?: number
  • numSegments?: number
  • backgroundColor?: TColor
  • fullyLitIndicatorColor?: TColor
  • indicatorWidthProportion?: number
    proportion of the width consumed by the indicator in the vertical direction, must be > 0 and <= to 1
  • indicatorHeightProportion?: number
    proportion of the each segment consumed by the indicator in the vertical direction, must be > 0 and <= to 1
  • & NodeOptions

Source Code

See the source for SegmentedBarGraphNode.ts in the scenery-phet repository.