Legend<D> class abstract

Legend behavior for charts.

Since legends are desired to be customizable, building and displaying the visual content of legends is done on the native platforms. This allows users to specify customized content for legends using the native platform (ex. for Flutter, using widgets).

Implemented types
Implementers

Constructors

Legend({required SelectionModelType selectionModelType, required LegendEntryGenerator<D> legendEntryGenerator, TextStyleSpec? entryTextStyle})

Properties

behaviorPosition BehaviorPosition
getter/setter pair
cellPadding LegendCellPadding?
getter/setter pair
chart BaseChart<D>
no setter
chartContext ChartContext
no setter
componentBounds Rectangle<int>?
Bounding box for drawing this component.
no setteroverride
customEntryOrder List<String>?
no getter
drawAreaBounds Rectangle<int>?
no setter
entryTextStyle TextStyleSpec?
Text style of the legend entry text.
getter/setter pair
graphicsFactory GraphicsFactory?
getter/setter pairoverride
hashCode int
The hash code for this object.
no setterinherited
insideJustification InsideJustification
getter/setter pair
isAxisFlipped bool
no setter
isRtl bool
no setter
isSeriesRenderer bool
Whether or not this component is a series renderer that draws series data.
no setteroverride
layoutConfig LayoutViewConfig
Layout params for this component.
no setteroverride
legendEntryGenerator LegendEntryGenerator<D>
final
legendPadding LegendCellPadding?
getter/setter pair
legendState LegendState<D>
final
legendTapHandling LegendTapHandling
Configures the behavior of the legend when the user taps/clicks on an entry. Defaults to no behavior.
getter/setter pair
outsideJustification OutsideJustification
getter/setter pair
role String
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectionModelType SelectionModelType
final
showOverlaySeries bool
Whether or not the legend show overlay series.
getter/setter pair
title String
The title text to display before legend entries.
getter/setter pair
titleTextStyle TextStyleSpec?
Text style of the legend title text.
getter/setter pair

Methods

attachTo(BaseChart<D> chart) → void
Injects the behavior into a chart.
override
defaultLegendMeasureFormatter(num? value) String
Default measure formatter for legends.
layout(Rectangle<int> componentBounds, Rectangle<int> drawAreaBounds) → void
Layout this component.
override
measure(int maxWidth, int maxHeight) ViewMeasuredSizes
Measure and return the size of this component.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onData(List<MutableSeries<D>> seriesList) → void
Resets any hidden series data when new data is drawn on the chart.
paint(ChartCanvas canvas, double animationPercent) → void
Draw this component on the canvas.
override
preProcessSeriesList(List<MutableSeries<D>> seriesList) → void
Overridable method that may be used by concrete Legend instances to manipulate the series list.
removeFrom(BaseChart<D> chart) → void
Removes the behavior from a chart.
override
toString() String
A string representation of this object.
inherited
updateLegend() → void
Requires override to show in native platform

Operators

operator ==(Object other) bool
The equality operator.
inherited