HighCharts: show tooltip on plotband hover

14 views Asked by At

I'm using HighCharts 11.2.0 and HighCharts Angular 4.0.0 and found an issue with showing a tooltip on hovering over a plotband. For this I created an issue in GitHub (https://github.com/highcharts/highcharts/issues/20516). This issue is resolved with 11.4.0 but I'm still getting an error. After further examination it looks like my event handling code is no longer working between 11.2.0 and 11.4.0. I've managed to create a sample application that triggers the error. See: https://angular-17-starter-project-reze9e.stackblitz.io

The problem is that the method I used to create a new Point object (new HighCharts.Point().init()) no longer works and should be replaced by a constructor call. However, it is unclear to me how this should be coded. The problamatic lines:

const point: Highcharts.Point = new Highcharts.Point().init(series, {
  value: plotLine.options.value,
});

Most answers that I could find relating to tooltips and plotband add additional points to the series data or but this won't work in my situation as I don't want to add an additional point to my series data. I need the additional point just to trigger a tooltip.

Some background info: the chart shows the low/mean/high values (payouts) for a certain year per month. The plotline shows what the payout would be when using a savings account with a certain interest rate. The plotline tooltip displays some additional information on the interest rate, etc.

Any suggestions?

0

There are 0 answers