onclick method Null safety

void onclick(
  1. dynamic d,
  2. dynamic element

Set a callback for click event on each data point. This callback will be called when each data point clicked and will receive d and element as the arguments.

  • d is the data clicked and element is the element clicked. In this callback, this will be the Chart object.


external void onclick(dynamic d, dynamic element);