Highchart在react中引入的方法为:
1.安装相关依赖
npm install highcharts
Npm install highcharts-react-offical
2.在相关模块引入:
Import Hightcharts from ‘highcharts’
Import HightchartsReact from ‘highcharts-react-offical’
如果需要某些特殊模块,则需要引入:
Import highcharts3d from ‘highcharts/highcharts-3d’
Highcharts3d(Highcharts)//初始化这个模块
3. render这个模块
<HighchartsReact highcharts={Highcharts} option={this.options}>
原文地址:https://www.cnblogs.com/celine-huang/p/10775545.html
时间: 2024-10-08 06:39:34