Vue Chart - Handle Tooltip Events

When a tooltip becomes shown or hidden, the Chart fires the tooltipShown or tooltipHidden event that you can handle with a function. If the handling function is not going to be changed during the lifetime of the UI component, assign it to the onTooltipShown or onTooltipHidden property respectively, when you configure the UI component.

HTML
TypeScript
  • <dx-chart
  • (onTooltipShown)="onTooltipShown($event)"
  • (onTooltipHidden)="onTooltipHidden($event)">
  • </dx-chart>
  • import { DxChartModule } from "devextreme-angular";
  • // ...
  • export class AppComponent {
  • onTooltipShown (e) {
  • let point = e.target;
  • // Handler of the "tooltipShown" event
  • }
  • onTooltipHidden (e) {
  • let point = e.target;
  • // Handler of the "tooltipHidden" event
  • }
  • }
  • @NgModule({
  • imports: [
  • // ...
  • DxChartModule
  • ],
  • // ...
  • })
See Also