I am trying to create a polar chart using the highcharts-react-official HighchartsReact wrapper. However, I get a regular line chart or errors. How do I use the highcharts/highcharts-more features with the HighchartsReact wrapper?
import React from 'react'; import {render} from 'react-dom'; import Highcharts from 'highcharts'; import HighchartsMore from 'highcharts/highcharts-more' import HighchartsReact from './HighchartsReact';HighchartsMore(Highcharts)
const options = {
chart: {
type: ‘polar’,
},
title: {
text: ‘Kahn Chart’
},
pane: {
startAngle: 0,
endAngle: 360
},
xAxis: {
tickInterval: 90,
min: 0,
max: 360,
labels: {
format: ‘{value}°’
}
},
yAxis: {
min: 0,
max: 10,
},
plotOptions: {
series: {
pointStart: 0,
pointInterval: 90
},
column: {
pointPadding: 0,
groupPadding: 0
}
},
series: [
{
type: ‘area’,
name: ‘c1’,
data: [7.15, 10, 9.85, 8.81],
},
{
type: ‘line’,
name: ‘c2’,
data: [4.65, 3.16, 4.30, 4.48],
},
{
type: ‘line’,
name: ‘Fair Value’,
data: [4.77,6.67, 6.57, 5.87],
}
]
};const App = () => (
<div>
<HighchartsReact highcharts={Highcharts} options={options} />
</div>
);render(<App/>, document.getElementById(‘root’));
#reactjs