Dart Documentationorson_chartsColorScaleElement

ColorScaleElement class

A table element that renders the colors for a ColorScale.

Extends

AbstractTableElement > ColorScaleElement

Implements

TableElement

Constructors

new ColorScaleElement(ColorScale scale, Orientation orientation, num barWidth, num barLength, Font font) #

Creates a new <code>ColorScaleElement</code> with the specified attributes.

Properties

Color backgroundColor #

inherited from AbstractTableElement

The background color.

final num barLength #

Returns the bar length.

final num barWidth #

Returns the bar width.

final ColorScale colorScale #

Returns the color scale.

final Font font #

Returns the font used to display the labels on the color scale.

Color foregroundColor #

inherited from AbstractTableElement

The foreground color.

Insets insets #

inherited from AbstractTableElement

The insets.

final Orientation orientation #

Returns the orientation.

RefPt2D refPoint #

inherited from AbstractTableElement

The reference point for the element.

String tag #

inherited from AbstractTableElement

The element tag.

Methods

void draw(CanvasRenderingContext2D context, Rectangle bounds) #

Draws the element within the specified bounds.

void drawHorizontalScale(ColorScale colorScale, CanvasRenderingContext2D context, Rectangle bounds) #

Draws the color scale horizontally within the specified bounds.

void drawVerticalScale(ColorScale colorScale, CanvasRenderingContext2D context, Rectangle bounds) #

Draws the color scale vertically within the specified bounds.

List<Rectangle> layoutElements(CanvasRenderingContext2D context, Rectangle bounds) #

Calculates the layout for the elements within this element, returning a list of bounding rectangles.

docs inherited from TableElement

Dimension2D preferredSize(CanvasRenderingContext2D context, Rectangle bounds) #

Returns the preferred size for this element.

void receive(TableElementVisitor visitor) #

Receives a visitor. This is part of a general mechanism to perform operations on an arbitrary hierarchy of table elements. You will not normally call this method directly.