简体   繁体   中英

ChartJS Annotations display custom label

is there any way to display a custom label on mouse hover chartJS annotations like it displayed on ChartJS? For example, when you create a line chart of points, and you hover one of the points, it displays the label of that point. I want something similar to that but on annotation.

onHover API

  options: {
    // LOOK AT ME!!! I'M SO IMPORTANT!!!
    onHover: function onHover (evt, activeElements) {
      if (!activeElements || !activeElements.length) return;
      // logic operation
      this.update();
    },


  },

https://www.chartjs.org/docs/latest/configuration/legend.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM