Dart Documentationorson_chartsStandardLegendBuilder

StandardLegendBuilder class

A legend builder (provides a standard implementation of the LegendBuilder interface).

Implements

LegendBuilder

Constructors

new StandardLegendBuilder(String header, String footer) #

Creates a new legend builder with the specified header and footer text (both of which can be null).

Properties

VAlign columnAlignment #

The vertical alignment.

The legend footer text (can be null).

HAlign footerAlignment #

The legend footer alignment.

The legend header text (can be null).

HAlign headerAlignment #

The legend header alignment.

HAlign rowAlignment #

The row alignment.

Methods

TableElement createLegend(Plot3D plot, Anchor2D anchor, Orientation orientation, ChartStyle style) #

Creates a legend for a plot, with the specified anchor and orientation. The style object provides style info (for example, the font and color for legend item text).

docs inherited from LegendBuilder

TableElement createSimpleLegend(List<LegendItemInfo> items, Anchor2D anchor, Orientation orientation, ChartStyle style) #

Creates a simple legend (a flow layout containing one item for each of the supplied items). The header and footer can be added afterwards.

HAlign horizontalAlignment(Anchor2D anchor) #

Returns a default horizontal alignment for the specified anchor point. If the anchor is at the left, HAlign.LEFT is returned. If the anchor is at the right, HAlign.RIGHT is returned. Otherwise, HAlign.CENTER is returned.

VAlign verticalAlignment(Anchor2D anchor) #

Returns a default horizontal alignment for the specified anchor point. If the anchor is at the top, VAlign.TOP is returned. If the anchor is at the bottom, VAlign.BOTTOM is returned. Otherwise, VAlign.MIDDLE is returned.