DynamicTimeSeriesConfig.fromJson constructor
DynamicTimeSeriesConfig.fromJson(
- Map<String, dynamic> j
)
Implementation
factory DynamicTimeSeriesConfig.fromJson(
Map<String, dynamic> j,
) => DynamicTimeSeriesConfig(
windowSize: math.max(1, JsonValue.intOrNull(j['windowSize']) ?? 60),
updateInterval: Duration(
milliseconds: math.max(
1,
JsonValue.intOrNull(j['updateIntervalMs']) ?? 500,
),
),
title: j['title'] != null ? TitlesData.fromJson(j['title']) : null,
tooltip: j['tooltip'] != null ? ChartTooltip.fromJson(j['tooltip']) : null,
legend: j['legend'] != null ? ChartLegend.fromJson(j['legend']) : null,
toolbox: j['toolbox'] != null ? ChartToolbox.fromJson(j['toolbox']) : null,
grid: j['grid'] != null ? GridData.fromJson(j['grid']) : null,
);