我使用react-highcharts在我的仪表板页面中创建一个SolidGauge.
并绘制圆边.
所以,我将plotOptions.rounded设置为true.
码:
import ReactHighcharts from 'react-highcharts';
import HighchartsMore from 'highcharts-more';
import SolidGauge from 'highcharts-solid-gauge';
HighchartsMore(ReactHighcharts.Highcharts);
SolidGauge(ReactHighcharts.Highcharts);
...
<ReactHighcharts config={ config }/>
config = {
...
plotOptions: {
solidgauge: {
dataLabels: {
enabled: false
},
linecap: 'round',
rounded: true,
stickyTracking: false
}
}
}
Run Code Online (Sandbox Code Playgroud)
它在官方jsfiddle中使用相同的配置设置.
但是ReactHighcharts不起作用.
有没有人有建议或可以提供帮助?
感谢您提供任何帮助.
07/14更新
码:
import React, { Component } from 'react';
import ReactHighcharts from 'react-highcharts';
import HighchartsMore from 'highcharts-more';
import SolidGauge from 'highcharts-solid-gauge';
class Demo extends Component {
constructor …Run Code Online (Sandbox Code Playgroud)