ParallelChartConfig.fromJson constructor

ParallelChartConfig.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ParallelChartConfig.fromJson(Map<String, dynamic> json) {
  final axes = JsonValue.stringList(json['axes']) ?? const <String>[];
  final s = (JsonValue.mapList(json['series']) ?? const [])
      .map(Series.fromJson)
      .toList();
  return ParallelChartConfig(
    axes: axes,
    series: s,
    lineOpacity: JsonValue.doubleOrNull(json['lineOpacity']) ?? 0.5,
    title: json['title'] != null ? TitlesData.fromJson(json['title']) : null,
    tooltip: json['tooltip'] != null
        ? ChartTooltip.fromJson(json['tooltip'])
        : null,
    legend: json['legend'] != null
        ? ChartLegend.fromJson(json['legend'])
        : null,
    toolbox: json['toolbox'] != null
        ? ChartToolbox.fromJson(json['toolbox'])
        : null,
    grid: json['grid'] != null ? GridData.fromJson(json['grid']) : null,
  );
}