Reactjs 使用功能组件和格式化程序对jsx highcharts作出反应
我正在用极坐标图测试react jsx highcharts的可能性 版本:Reactjs 使用功能组件和格式化程序对jsx highcharts作出反应,reactjs,typescript,charts,formatter,react-functional-component,Reactjs,Typescript,Charts,Formatter,React Functional Component,我正在用极坐标图测试react jsx highcharts的可能性 版本: 反应:17.0.1 react jsx highcharts:4.2.0 打字稿:4.0.3 我正在使用功能组件。所以,我的代码中没有任何“类”或“这个” 图表代码为: <HighchartsProvider Highcharts={Highcharts}> <HighchartsChart polar plotOptions={plotOptions}>
反应:17.0.1
react jsx highcharts:4.2.0
打字稿:4.0.3 我正在使用功能组件。所以,我的代码中没有任何“类”或“这个” 图表代码为:
<HighchartsProvider Highcharts={Highcharts}>
<HighchartsChart polar plotOptions={plotOptions}>
<Tooltip shared
formatter={tooltipFormatter}
/>
...
</HighchartsChart>
</HighchartsProvider>
但是typescript不接受它,我也找不到一种方法来构建一个清晰丰富的格式化程序
谢谢大家!
const tooltipFormatter:TooltipFormatterCallbackFunction = (mycontext: TooltipFormatterContextObject, mytooltip: Tooltip) => {
return "...";
}