LegendConfig class
Configuration for legend rendering.
- Inheritance
-
- Object
- RendererConfig
- LegendConfig
Constructors
- LegendConfig({bool visible = true, ChartPosition position = ChartPosition.bottom, ChartAlignment alignment = ChartAlignment.center, LegendLayout layout = LegendLayout.horizontal, double itemSpacing = 16.0, double lineSpacing = 8.0, double markerSize = 12.0, double markerLabelSpacing = 6.0, TextStyle? labelStyle, TextStyle? valueStyle, EdgeInsets padding = const EdgeInsets.all(8), Color? backgroundColor, Color? borderColor, double borderWidth = 0.0, double borderRadius = 4.0, bool showValues = false, bool showPercentages = false, int? maxLines, bool interactive = true})
-
const
Properties
- alignment → ChartAlignment
-
Alignment within the position.
final
- backgroundColor → Color?
-
Background color of the legend.
final
- borderColor → Color?
-
Border color of the legend.
final
- borderRadius → double
-
Border radius.
final
- borderWidth → double
-
Width of the border.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- interactive → bool
-
Whether legend items are interactive.
final
- isHorizontalPosition → bool
-
Whether this is a horizontal position.
no setter
- itemSpacing → double
-
Spacing between items.
final
- labelStyle → TextStyle?
-
Style for legend labels.
final
- layout → LegendLayout
-
Layout style for legend items.
final
- lineSpacing → double
-
Spacing between lines (for wrapped layout).
final
- markerLabelSpacing → double
-
Spacing between marker and label.
final
- markerSize → double
-
Size of legend markers.
final
- maxLines → int?
-
Maximum number of lines (for wrapped layout).
final
- padding → EdgeInsets
-
Padding around the legend.
final
- position → ChartPosition
-
Position of the legend relative to the chart.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showPercentages → bool
-
Whether to show percentages.
final
- showValues → bool
-
Whether to show values.
final
- valueStyle → TextStyle?
-
Style for legend values.
final
- visible → bool
-
Whether this component is visible.
final
Methods
-
copyWith(
{bool? visible, ChartPosition? position, ChartAlignment? alignment, LegendLayout? layout, double? itemSpacing, double? lineSpacing, double? markerSize, double? markerLabelSpacing, TextStyle? labelStyle, TextStyle? valueStyle, EdgeInsets? padding, Color? backgroundColor, Color? borderColor, double? borderWidth, double? borderRadius, bool? showValues, bool? showPercentages, int? maxLines, bool? interactive}) → LegendConfig - Creates a copy with updated values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited