admin管理员组

文章数量:1393843

I've been using the react-jsx-highcharts module, to integrate Highcharts into my React app.

Works great. Now I want to include the boost module. I'm not sure how to do this. I tried simply adding import 'highcharts/modules/boost' but this doesn't seem to work.

Anyone know how to go about this?

I've been using the react-jsx-highcharts module, to integrate Highcharts into my React app.

Works great. Now I want to include the boost module. I'm not sure how to do this. I tried simply adding import 'highcharts/modules/boost' but this doesn't seem to work.

Anyone know how to go about this?

Share Improve this question edited Mar 26, 2018 at 13:11 Daniel Loiterton asked Jan 26, 2018 at 11:29 Daniel LoitertonDaniel Loiterton 5,3185 gold badges35 silver badges51 bronze badges 1
  • 1 highcharts-more and modules/boost work the same way :) So yes, use the same require(...)(Highcharts) and it will work. – Paweł Fus Commented Jan 26, 2018 at 11:50
Add a ment  | 

1 Answer 1

Reset to default 10

This is a feature of the highcharts module (not react-jsx-highcharts) and is explained in its documentation:

var Highcharts = require('highcharts');
require('highcharts/modules/boost')(Highcharts);

Alternatively, you can use import like so:

import Highcharts from 'highcharts';
import boost from 'highcharts/modules/boost';
boost(Highcharts);

本文标签: javascripthow to import highcharts sub modules in React appStack Overflow