toJson method
Implementation
Json toJson() => {
'domain': domain,
if (min != null) 'min': min,
if (max != null) 'max': max,
'margins': [marginTop, marginBottom],
if (include.isNotEmpty) 'include': include,
'mode': mode,
'width': width,
'labels': labels,
'decimals': decimals,
if (side != 'right') 'side': side,
if (prefix.isNotEmpty) 'prefix': prefix,
if (suffix.isNotEmpty) 'suffix': suffix,
if (ticks != 5) 'ticks': ticks,
if (tickValues.isNotEmpty) 'tickValues': [for (final t in tickValues) t.toJson()],
if (nice) 'nice': nice,
};