TreemapChartSpec.fromJson constructor

TreemapChartSpec.fromJson(
  1. Map json_
)

Implementation

TreemapChartSpec.fromJson(core.Map json_)
    : this(
        colorData: json_.containsKey('colorData')
            ? ChartData.fromJson(
                json_['colorData'] as core.Map<core.String, core.dynamic>)
            : null,
        colorScale: json_.containsKey('colorScale')
            ? TreemapChartColorScale.fromJson(
                json_['colorScale'] as core.Map<core.String, core.dynamic>)
            : null,
        headerColor: json_.containsKey('headerColor')
            ? Color.fromJson(
                json_['headerColor'] as core.Map<core.String, core.dynamic>)
            : null,
        headerColorStyle: json_.containsKey('headerColorStyle')
            ? ColorStyle.fromJson(json_['headerColorStyle']
                as core.Map<core.String, core.dynamic>)
            : null,
        hideTooltips: json_.containsKey('hideTooltips')
            ? json_['hideTooltips'] as core.bool
            : null,
        hintedLevels: json_.containsKey('hintedLevels')
            ? json_['hintedLevels'] as core.int
            : null,
        labels: json_.containsKey('labels')
            ? ChartData.fromJson(
                json_['labels'] as core.Map<core.String, core.dynamic>)
            : null,
        levels:
            json_.containsKey('levels') ? json_['levels'] as core.int : null,
        maxValue: json_.containsKey('maxValue')
            ? (json_['maxValue'] as core.num).toDouble()
            : null,
        minValue: json_.containsKey('minValue')
            ? (json_['minValue'] as core.num).toDouble()
            : null,
        parentLabels: json_.containsKey('parentLabels')
            ? ChartData.fromJson(
                json_['parentLabels'] as core.Map<core.String, core.dynamic>)
            : null,
        sizeData: json_.containsKey('sizeData')
            ? ChartData.fromJson(
                json_['sizeData'] as core.Map<core.String, core.dynamic>)
            : null,
        textFormat: json_.containsKey('textFormat')
            ? TextFormat.fromJson(
                json_['textFormat'] as core.Map<core.String, core.dynamic>)
            : null,
      );