toJson method
Implementation
Json toJson() => {
if (x != null) 'x': x,
if (y != null) 'y': y,
if (from != null) 'from': from,
if (to != null) 'to': to,
'color': _hex(color),
'line': line,
'width': width,
if (label.isNotEmpty) 'label': label,
if (labelColor != null) 'labelColor': _hex(labelColor!),
'radius': radius,
if (fill != null) 'fill': _hex(fill!),
if (below) 'below': below,
};