BarLabelRotationConfig class
Standard bar chart where X-axis category labels are rendered at a configurable rotation angle (default 45°). Useful for long labels.
JSON:
{ "type": "barLabelRotation", "labelRotation": 45,
"categories": ["January","February","March","April"],
"series": [{ "name": "Revenue", "data": [820,932,901,934] }] }
- Inheritance
-
- Object
- BaseChartConfig
- BarLabelRotationConfig
Constructors
-
BarLabelRotationConfig({required List<
String> categories, required List<Series> series, ChartTheme theme = ChartTheme.light, double labelRotation = 45.0, double barWidthRatio = 0.55, bool showValues = false, TitlesData? title, ChartTooltip? tooltip, ChartLegend? legend, ChartToolbox? toolbox, GridData? grid}) -
BarLabelRotationConfig.fromJson(Map<
String, dynamic> j) -
factory
Properties
- apiContract → ChartApiContract
-
Shared API contract for all config-driven chart families.
no setterinherited
- barWidthRatio → double
-
final
-
categories
→ List<
String> -
final
- controller → ChartController?
-
finalinherited
- grid → GridData?
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- labelRotation → double
-
final
- legend → ChartLegend?
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
series
→ List<
Series> -
finalinherited
- showValues → bool
-
final
- theme → ChartTheme
-
final
- title → TitlesData?
-
finalinherited
- toolbox → ChartToolbox?
-
finalinherited
- tooltip → ChartTooltip?
-
finalinherited
- type → ChartType
-
finalinherited
- xAxisConfig → ChartAxisConfig?
-
finalinherited
- yAxisConfig → ChartAxisConfig?
-
finalinherited
Methods
-
buildChart(
) → Widget -
Method to create the appropriate chart widget
override
-
getMaxSeriesValue(
) → double -
Safe maximum value with 10% headroom.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
supportsApiField(
String field) → bool -
inherited
-
toJson(
) → Map< String, dynamic> -
Convert configuration to JSON
override
-
toString(
) → String -
A string representation of this object.
inherited
-
withController(
ChartController controller) → BaseChartConfig -
Override in concrete configs to return a controller-attached copy.
inherited
-
withTheme(
ChartTheme theme) → BaseChartConfig -
Override in concrete configs to return a themed copy.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited