This is an example of how to render React component for Highcharts tooltip using React portals. See Chart.tsx
and Tooltip.tsx
files below. Latest Highcharts version is required for the example to work correctly (9.0.0 at the time of writting).
Codesandbox: https://codesandbox.io/s/highcharts-react-tooltip-ut1uy
@maciej-gurban, I think it was throwing an error for you because it needs actual
Point
rather thanTooltipFormatterContextObject
. The following should work for both shared and not shared tooltips:Obviously, you need to tweak rendering logic in
Chart.tsx
as well. E.g. https://codesandbox.io/s/highcharts-react-tooltip-forked-mvw0i