TenunChartJson class
A drop-in replacement for TenunChart that accepts raw JSON and enables seamless chart-type switching without data loss.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TenunChartJson
- Available extensions
Constructors
-
TenunChartJson({Key? key, required Map<
String, dynamic> jsonConfig, ChartType? forceType, ChartTheme? theme, ChartController? controller, bool safeBuild = true, bool forceCrossShapeSwitch = true, bool autoNormalizePayload = false, PayloadNormalizationOptions? normalizationOptions, bool buildWhenInvalid = false, bool requireRegisteredType = true, TenunChartJsonBuildResultHandler? onBuildResult, TenunChartJsonSwitchResultHandler? onSwitchResult, TenunChartJsonErrorBuilder? errorBuilder, TenunChartJsonSwitchErrorBuilder? switchErrorBuilder, int validationReportMaxIssues = 3, TenunDiagnosticFallbackOptions diagnosticFallbackOptions = const TenunDiagnosticFallbackOptions()}) -
const
Properties
- apiContract → ChartApiContract?
-
Available on Widget, provided by the ChartWidgetApiContractExtension extension
no setter - autoNormalizePayload → bool
-
If true, run shared payload normalization before direct option parsing.
final
- buildWhenInvalid → bool
-
If true, config resolution is attempted even when validation has errors.
Useful for diagnostics; keep false for normal rendering.
final
- controller → ChartController?
-
Controller for zoom/pan interactions
final
- diagnosticFallbackOptions → TenunDiagnosticFallbackOptions
-
Optional presentation options for the built-in diagnostic fallback widgets.
final
- errorBuilder → TenunChartJsonErrorBuilder?
-
Optional custom fallback when safeBuild detects an unsafe payload.
final
- forceCrossShapeSwitch → bool
-
If true, forced type switches may use supported cross-shape conversion.
final
- forceType → ChartType?
-
Optional force-override for the chart type.
Useful for UI toggles like "Bar / Line / Pie" buttons.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
jsonConfig
→ Map<
String, dynamic> -
Raw JSON configuration (ECharts style)
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- normalizationOptions → PayloadNormalizationOptions?
-
Optional normalization policy used when autoNormalizePayload is true
or the payload opts into normalization.
final
- onBuildResult → TenunChartJsonBuildResultHandler?
-
Receives the non-throwing build result whenever the widget builds.
final
- onSwitchResult → TenunChartJsonSwitchResultHandler?
-
Receives the forced switch result when forceType is provided.
final
- requireRegisteredType → bool
-
Require the target type to be registered before rendering.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safeBuild → bool
-
If true, build JSON through TenunOption.tryBuild and render a fallback
instead of throwing when validation or config resolution fails.
final
- switchErrorBuilder → TenunChartJsonSwitchErrorBuilder?
-
Optional custom fallback when a forced forceType switch is not render-safe.
final
- theme → ChartTheme?
-
Custom theme override
final
- validationReportMaxIssues → int
-
Maximum validation issues shown by the default fallback.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< TenunChartJson> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recommendsApiField(
String field) → bool -
Available on Widget, provided by the ChartWidgetApiContractExtension extension
-
supportsApiField(
String field) → bool -
Available on Widget, provided by the ChartWidgetApiContractExtension extension
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited