ChartLineData.fromJson constructor

ChartLineData.fromJson(
  1. Map<String, dynamic> _json
)

Implementation

factory ChartLineData.fromJson(Map<String, dynamic> _json) {
  var r = ChartLineData(
      groupCode: _json['group_code'] as String,
      groupOrder: _json['group_order'] as int,
      dashPattern: _parseDashPattern(_json['dash_pattern']),
      x: _json['x'].toString(),
      y: _parseDouble(_json['y']),
      ys: _fromJsonList(_json['ys']),
      xDisplay: _json['x_display'] ?? _json['x'].toString(),
      yDisplay: _json['y_display'],
      yAxis: _json['y_axis'] as int,
      yAxisName: _json['y_axis_name'],
      color: _parseColor(_json['color']),
      fillColor: _parseColor(_json['fill_color']),
      orderId: _fromDynamic(_json['order_id']),
      renderId: _fromDynamic(_json['render_id']));
  return r;
}