Legend class

Customizes the legend.

Constructors

Legend({bool isVisible, LegendPosition position, ChartAlignment alignment, Color backgroundColor, Color borderColor, double borderWidth, double opacity, String height, String width, double padding, double iconHeight, double iconWidth, bool toggleSeriesVisibility, ChartTextStyle textStyle, bool isResponsive, LegendItemOrientation orientation, LegendTitle title, LegendItemOverflowMode overflowMode, LegendItemBuilder legendItemBuilder, Color iconBorderColor, double iconBorderWidth, double itemPadding })

Properties

alignment ChartAlignment
Alignment of the legend. Alignment will work if the legend width is greater than the total legend items’ width. [...]
final
backgroundColor Color
Background color of the legend. [...]
final
borderColor Color
Border color of the legend. [...]
final
borderWidth double
Border width of the legend. [...]
final
height String
The height of the legend. It takes percentage value from the overall chart height. [...]
final
iconBorderColor Color
Border color of the icon in the legend items. [...]
final
iconBorderWidth double
Border width of the icon in the legend items. [...]
final
iconHeight double
Height of the icon in legend item. [...]
final
iconWidth double
Width of the icon in legend item. [...]
final
isResponsive bool
Toggles the visibility of the legend if the width or height of the legend is greater than the plot area bounds. [...]
final
isVisible bool
Toggles the visibility of the legend. [...]
final
itemPadding double
Padding of the legend items. [...]
final
legendItemBuilder LegendItemBuilder
Widget builder for legend items. [...]
final
legendPosition LegendPosition
read / write
opacity double
Opacity of the legend. The value ranges from 0 to 1. [...]
final
orientation LegendItemOrientation
Orientation of the legend. The legend items will be placed either in horizontal or in vertical orientation. By default, it is set to auto, i.e. if the legend position is top or bottom, orientation is set to horizontal, else it is set to vertical. [...]
final
overflowMode LegendItemOverflowMode
The legend items can be scrolled, wrapped, or left as it is when it exceeds the available size. [...]
final
padding double
Padding between the legend items. [...]
final
position LegendPosition
Position of the legend. By default, the legend position is auto. i.e. If the chart width is greater than chart height, then the legend will be placed at the right, else it will be placed at the bottom of the chart. [...]
final
textStyle ChartTextStyle
Customizes the legend item text. [...]
final
title LegendTitle
Customizes the legend title. [...]
final
toggleSeriesVisibility bool
Toggles the series visibility. If it is set to false, then on tapping the legend item, series visibility will not be toggled. [...]
final
width String
The width of the legend. It takes percentage value from the overall chart width. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited