dv_legend library

Legend components for charts.

Classes

Legend
Base widget for displaying chart legends.
LegendConfig
Configuration for legend appearance.
LegendEntry
Data for a legend entry.
LegendItem
A standalone legend item widget with a symbol and label.
LegendLinear
A legend for continuous/linear data showing a color gradient.
LegendLinearConfig
Configuration for the linear legend.
LegendOrdinal<T>
A legend for categorical/ordinal data.

Enums

LegendDirection
The direction/layout of a legend.
LegendLinearOrientation
Orientation for the linear legend gradient.
LegendSymbolShape
The shape of legend symbols.

Functions

legendItem({Key? key, required String label, required Color color, LegendSymbolShape symbolShape = LegendSymbolShape.circle, double symbolSize = 12, double symbolLabelSpacing = 4, TextStyle? labelStyle, VoidCallback? onTap, bool isSelected = true, double inactiveOpacity = 0.3}) → Widget
Creates a LegendItem widget.
legendLinear({Key? key, required dynamic scale, LegendLinearConfig config = const LegendLinearConfig(), List<double>? tickValues, String tickFormat(double)?, String? title, TextStyle? titleStyle}) → Widget
Creates a LegendLinear widget.
legendOrdinal<T>({Key? key, required dynamic scale, Map<T, String>? labels, LegendConfig config = const LegendConfig(), void onTap(T value, int index)?, Set<T>? selectedValues, double inactiveOpacity = 0.3}) → Widget
Creates a LegendOrdinal widget.