toJson method
Convert to JSON.
Implementation
@override
Map<String, dynamic> toJson() => {
...baseToJson(),
'chartType': chartType,
'data': data,
if (title != null) 'title': title,
if (xAxis != null) 'xAxis': xAxis!.toJson(),
if (yAxis != null) 'yAxis': yAxis!.toJson(),
if (unit != null) 'unit': unit,
};