BasicChartSpec.fromJson constructor

BasicChartSpec.fromJson(
  1. Map json_
)

Implementation

BasicChartSpec.fromJson(core.Map json_)
    : this(
        axis: json_.containsKey('axis')
            ? (json_['axis'] as core.List)
                .map((value) => BasicChartAxis.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        chartType: json_.containsKey('chartType')
            ? json_['chartType'] as core.String
            : null,
        compareMode: json_.containsKey('compareMode')
            ? json_['compareMode'] as core.String
            : null,
        domains: json_.containsKey('domains')
            ? (json_['domains'] as core.List)
                .map((value) => BasicChartDomain.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        headerCount: json_.containsKey('headerCount')
            ? json_['headerCount'] as core.int
            : null,
        interpolateNulls: json_.containsKey('interpolateNulls')
            ? json_['interpolateNulls'] as core.bool
            : null,
        legendPosition: json_.containsKey('legendPosition')
            ? json_['legendPosition'] as core.String
            : null,
        lineSmoothing: json_.containsKey('lineSmoothing')
            ? json_['lineSmoothing'] as core.bool
            : null,
        series: json_.containsKey('series')
            ? (json_['series'] as core.List)
                .map((value) => BasicChartSeries.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        stackedType: json_.containsKey('stackedType')
            ? json_['stackedType'] as core.String
            : null,
        threeDimensional: json_.containsKey('threeDimensional')
            ? json_['threeDimensional'] as core.bool
            : null,
        totalDataLabel: json_.containsKey('totalDataLabel')
            ? DataLabel.fromJson(json_['totalDataLabel']
                as core.Map<core.String, core.dynamic>)
            : null,
      );