kirjs / react-highcharts

React wrapper for Highcharts library
http://kirjs.github.io/react-highcharts/
MIT License
1.26k stars 233 forks source link

outside: true on Tooltip - Error when trying to trigger the tooltip manually #456

Open Amiryy opened 4 years ago

Amiryy commented 4 years ago

Hello, So what I'm trying to do here is trigger my tooltip manually, not using the mouse to hover over a point. I wanna make the tooltip appear when the user hovers something else on the page (e.g. a table row).

When I am setting outside: true in chartConfig.tooltip, every time I try to trigger the tooltip manually I get:

Error in /turbo_modules/highcharts@6.2.0/highcharts.js (189:336)
Cannot read property 'top' of undefined

Note that when I set outside: true, hovering over a point to trigger the tooltip normally would not cause the error. I am using the following syntax to trigger the tooltip manually:

point.setState("hover");
chartObject.tooltip.refresh(point);

In this example, I am trying to trigger the tooltip on the first point in the onChartReady callback for the demonstration: https://stackblitz.com/edit/react-highcharts-bug-example

Thanks