handleLegendItemTapped method

  1. @protected
void handleLegendItemTapped(
  1. LegendItem item,
  2. bool isToggled
)

Implementation

@protected
void handleLegendItemTapped(LegendItem item, bool isToggled) {
  if (parent != null && parent!.onLegendTapped != null) {
    final ChartLegendItem legendItem = item as ChartLegendItem;
    final LegendTapArgs args = LegendTapArgs(
        legendItem.series, legendItem.seriesIndex, legendItem.pointIndex);
    parent!.onLegendTapped!(args);
  }
  parent!.behaviorArea?.hideInteractiveTooltip();
}