BarChartJsonConfig class

JSON configuration for bar charts with optional Plotly compatibility. This class provides a bridge between JSON format and Flutter widgets.

Constructors

BarChartJsonConfig.new({required List<Map<String, dynamic>> data, required Map<String, dynamic> style, required double width, required double height, bool showGrid = true, bool showValues = true, EdgeInsets padding = const EdgeInsets.all(24), int horizontalGridLines = 5, bool interactive = true, VoidCallback? onAnimationComplete})
Creates a BarChartJsonConfig instance.
const
BarChartJsonConfig.fromJson(Map<String, dynamic> json)
Creates a BarChartJsonConfig from a JSON map. Supports both simple and Plotly-compatible formats.
factory
BarChartJsonConfig.fromJsonString(String jsonString)
Creates a BarChartJsonConfig from a JSON string.
factory

Properties

data List<Map<String, dynamic>>
The data points for the chart
final
hashCode int
The hash code for this object.
no setterinherited
height double
final
horizontalGridLines int
final
interactive bool
final
onAnimationComplete VoidCallback?
final
padding EdgeInsets
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showGrid bool
Display options
final
showValues bool
final
style Map<String, dynamic>
The style configuration
final
width double
Chart dimensions
final

Methods

getBarChartData() List<BarChartData>
Converts the JSON configuration to Flutter models.
getBarChartStyle() BarChartStyle
Converts the JSON configuration to Flutter style.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the configuration to a JSON map.
toJsonString() String
Converts the configuration to a JSON string.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited