I am testing the react-jsx-highcharts possibilities with a polar chart.
Versions:
React: 17.0.1
react-jsx-highcharts: 4.2.0
typescript: 4.0.3
I am using the functional components. So, I don't have any "class" nor "this" in my code.
The chart code is :
<HighchartsProvider Highcharts={Highcharts}>
<HighchartsChart polar plotOptions={plotOptions}>
<Tooltip shared
formatter={tooltipFormatter}
/>
...
</HighchartsChart>
</HighchartsProvider>
All the examples that I have found use this.x, this.value to generate a rich formatter. For example here or here
I have tried to use the explicit type as:
const tooltipFormatter:TooltipFormatterCallbackFunction = (mycontext: TooltipFormatterContextObject, mytooltip: Tooltip) => {
return "...";
}
but typescript does not accept it, and I cannot find a way to build a clear rich formatter.
Thank you!