snapshot method

ChartSelection snapshot()

Returns an immutable snapshot for JSON-like selected values.

Implementation

ChartSelection snapshot() {
  final frozenValue = _freezeSelectionValue(value);
  if (identical(frozenValue, value)) return this;
  return ChartSelection(
    seriesIndex: seriesIndex,
    dataIndex: dataIndex,
    value: frozenValue,
  );
}