BarNormalizedConfig.fromJson constructor
BarNormalizedConfig.fromJson(
- Map<String, dynamic> j
)
Implementation
factory BarNormalizedConfig.fromJson(Map<String, dynamic> j) {
final cats = (j['categories'] as List? ?? [])
.map((e) => e.toString())
.toList();
final s = _seriesFromJson(j['series']);
return BarNormalizedConfig(
categories: cats,
series: s,
showPercentLabels: j['showPercentLabels'] as bool? ?? true,
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,
);
}