toJson method
Serializes this annotation to JSON.
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'type': 'PointAnnotation',
if (label != null) 'label': label,
'seriesId': seriesId,
'dataPointIndex': dataPointIndex,
'offset': {'dx': offset.dx, 'dy': offset.dy},
'markerShape': markerShape.name,
'markerSize': markerSize,
'markerColor': markerColor.toARGB32(),
'labelMargin': labelMargin,
'allowDragging': allowDragging,
'allowEditing': allowEditing,
'zIndex': zIndex,
};
}