DataLabelSettings class

Customizes the data label.

Data labels can be added to a chart series by enabling the isVisible option in the dataLabelSettings. It has options to customize the appearance of the data label.

Provide options like color, border width, border color, alignment and data label text style for customization.

Constructors

DataLabelSettings({ChartAlignment alignment: ChartAlignment.center, Color color, TextStyle textStyle, EdgeInsets margin, double opacity: 1, ChartDataLabelAlignment labelAlignment: ChartDataLabelAlignment.auto, double borderRadius: 5, bool isVisible: false, int angle: 0, ChartWidgetBuilder builder, bool useSeriesColor, Offset offset, bool showCumulativeValues: false, bool showZeroValue: true, Color borderColor, double borderWidth, LabelIntersectAction labelIntersectAction, ConnectorLineSettings connectorLineSettings, ChartDataLabelPosition labelPosition})
Creating an argument constructor of DataLabelSettings class.

Properties

alignment ChartAlignment
Alignment of the data label. [...]
final
angle int
Rotation angle of the data label. [...]
final
borderColor Color
Border color of the data label. [...]
final
borderRadius double
Customizes the data label border radius. [...]
final
borderWidth double
Border width of the data label. [...]
final
builder ChartWidgetBuilder
Builder for data label. [...]
final
color Color
Color of the data label. [...]
final
connectorLineSettings ConnectorLineSettings
Customizes the connector lines. Connector line is rendered when the data label is placed outside the chart. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
isVisible bool
Toggles the visibility of the data label in the series. [...]
final
labelAlignment ChartDataLabelAlignment
Position of the data label. [...]
final
labelIntersectAction LabelIntersectAction
Action on data labels intersection. [...]
final
labelPosition ChartDataLabelPosition
Position of the data label. [...]
final
margin EdgeInsets
Margin between the data label text and its shape. [...]
final
offset Offset
Moves the data label vertically or horizontally from its position. [...]
final
opacity double
Opacity of the data label. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
showCumulativeValues bool
To show the cummulative values in stacked type series charts. [...]
final
showZeroValue bool
Hides the data label and its connector line, if the data point value is 0 (Zero). [...]
final
textStyle TextStyle
Customizes the data label font. [...]
final
useSeriesColor bool
Uses the series color for filling the data label shape [...]
final

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 ==(Object other) bool
The equality operator. [...]
inherited