Dart Documentationorson_chartsGridElement

GridElement class

A container element that arranges its children in a grid layout. The grid can be built up dynamically by adding child elements with row and column keys to identify each one.

Extends

AbstractTableElement > GridElement

Implements

TableElement

Static Properties

final Color TRANSPARENT_COLOR #

A completely transparent color.

Constructors

new GridElement() #

Creates a new grid element, initially empty.

Properties

Color backgroundColor #

inherited from AbstractTableElement

The background color.

Color foregroundColor #

inherited from AbstractTableElement

The foreground color.

Insets insets #

inherited from AbstractTableElement

The insets.

RefPt2D refPoint #

inherited from AbstractTableElement

The reference point for the element.

String tag #

inherited from AbstractTableElement

The element tag.

Methods

void addElement(TableElement element, Comparable rowKey, Comparable columnKey) #

Adds an element to the grid. If there is already an element with the specified rowKey and columnKey, it is replaced.

void draw(CanvasRenderingContext2D context, Rectangle bounds) #

Draws this element and all of its children on the canvas within the specified bounds.

docs inherited from TableElement

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 of the element. The bounds provides some context regarding the maximum available height and width.

docs inherited from TableElement

void receive(TableElementVisitor visitor) #

Iterates over the child elements in the grid and calls receive(visitor) for each of them.