getDatumDetails method

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

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

Implementation

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

  for (final seriesDatum in treeMapSelection.selectedDatum) {
    final series = seriesDatum.series;
    final datumIndex = seriesDatum.index;
    final renderer = getSeriesRenderer(series.getAttr(rendererIdKey));

    final datumDetails = renderer.addPositionToDetailsForSeriesDatum(
        DatumDetails(
            datum: seriesDatum.datum,
            domain: series.domainFn(datumIndex),
            measure: series.measureFn(datumIndex),
            series: seriesDatum.series,
            color: series.colorFn!(datumIndex)),
        seriesDatum);
    details.add(datumDetails);
  }
  return details;
}