# Programmatic Event Triggers

function triggerHover(chart) {
  if (chart.getActiveElements().length > 0) {
    chart.setActiveElements([]);
  } else {
    chart.setActiveElements([
      {
        datasetIndex: 0,
        index: 0,
      }, {
        datasetIndex: 1,
        index: 0,
      }
    ]);
  }
  chart.update();
}

# API

# Docs

Last Updated: 10/28/2024, 1:36:05 PM