toJson method

Json toJson()

Implementation

Json toJson() => {
      'type': 'graph',
      'key': key,
      'x': x.toJson(),
      'panes': [for (final p in panes) p.toJson()],
      if (transforms.isNotEmpty) 'transforms': [for (final t in transforms) t.toJson()],
      'crosshair': crosshair.toJson(),
      'interactions': interactions.toJson(),
      'style': style.toJson(),
      if (selection.on != 'none') 'selection': selection.toJson(),
      if (animate > 0) 'animate': animate,
      if (animateIn) 'animateIn': animateIn,
      'legend': legend.toJson(),
    };