getDatumDetails method

  1. @override
List<DatumDetails<D>> getDatumDetails(
  1. SelectionModelType type
)
override

Returns a list of datum details from selection model of type.

Implementation

@override
List<DatumDetails<D>> getDatumDetails(SelectionModelType type) {
  final entries = <DatumDetails<D>>[];

  for (final seriesDatum in getSelectionModel(type).selectedDatum) {
    final rendererId = seriesDatum.series.getAttr(rendererIdKey);
    final renderer = getSeriesRenderer(rendererId);

    // This should never happen.
    if (renderer is! ArcRenderer<D>) {
      continue;
    }

    final details = renderer.getExpandedDatumDetails(seriesDatum);

    if (details != null) {
      entries.add(details);
    }
  }

  return entries;
}