core.Map<core.String, core.dynamic> toJson() => { if (chartId != null) 'chartId': chartId!, if (spec != null) 'spec': spec!, };