toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  final Map<String, dynamic> json = <String, dynamic>{};
  if (background != null) {
    json['background'] = background!.toJson();
  }
  if (height != null) {
    json['height'] = height;
  }
  if (line != null) {
    json['line'] = line!.toJson();
  }
  if (point != null) {
    json['point'] = hcJsonValue(point);
  }
  if (points != null) {
    json['points'] = points!.map((e) => hcJsonValue(e)).toList();
  }
  if (type != null) {
    json['type'] = type;
  }
  if (xAxis != null) {
    json['xAxis'] = xAxis;
  }
  if (yAxis != null) {
    json['yAxis'] = yAxis;
  }
  return json;
}