# 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: 12/1/2024, 4:35:13 PM