I googled and they said I need highstock module, but I don't want use
<script type="text/javascript" src="http://code.highcharts.com/stock/highstock.js"></script>
(I don't know where to import it..)
is there a react way to import highstock module?
I have tried this:
import Highcharts from 'highcharts/highstock';
import HighchartsReact from 'highcharts-react-official';
import HC_more from 'highcharts/highcharts-more';
<HighchartsReact
allowChartUpdate={true}
updateArgs={[true, true, true]}
hicharts={Highcharts}
options={chartConfig}
ref={chart}
></HighchartsReact>
and the chartConfig:
const chartOption = {
chart: {
type: "bar"
},
scrollbar: {
enabled: true
},
xAxis: {
scrollbar: {
enabled: true
},
min: 0,
max: 2,
},
series: [
{
name: "Browsers",
colorByPoint: true,
data: chartData
}
]
};
it just not work for me . here is the demo: https://stackblitz.com/edit/react-highchart-jjzjx118