DatumLegend<D> class

Datum legend behavior for charts.

By default this behavior creates one legend entry per datum in the first series rendered on the chart.

TODO: Allows for hovering over a datum in legend to highlight corresponding datum in draw area.

TODO: Implement tap to hide individual data in the series.

Inheritance

Constructors

DatumLegend({SelectionModelType? selectionModelType, LegendEntryGenerator<D>? legendEntryGenerator, MeasureFormatter? measureFormatter, MeasureFormatter? secondaryMeasureFormatter, bool? showMeasures, LegendDefaultMeasure? legendDefaultMeasure, TextStyleSpec? entryTextStyle})

Properties

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

Methods

attachTo(BaseChart<D> chart) → void
Injects the behavior into a chart.
inherited
defaultLegendMeasureFormatter(num? value) String
Default measure formatter for legends.
inherited
layout(Rectangle<int> componentBounds, Rectangle<int> drawAreaBounds) → void
Layout this component.
inherited
measure(int maxWidth, int maxHeight) ViewMeasuredSizes
Measure and return the size of this component.
inherited
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.
inherited
paint(ChartCanvas canvas, double animationPercent) → void
Draw this component on the canvas.
inherited
preProcessSeriesList(List<MutableSeries<D>> seriesList) → void
Overridable method that may be used by concrete Legend instances to manipulate the series list.
inherited
removeFrom(BaseChart<D> chart) → void
Removes the behavior from a chart.
inherited
toString() String
A string representation of this object.
inherited
updateLegend() → void
Requires override to show in native platform
inherited

Operators

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