stj
Posts: 16
Joined: Tue Jul 06, 2021 9:24 am

Import additional packages in React

How can we import additional packages such as 'columnpyramid' in React?
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Import additional packages in React

Hello stj,

Thanks for contacting us with your question.

As you can read in our API docs, highcharts-more is required to use columnpyramid series. In react you need to add a module, import and initialize it. In this case it would look like this:

Code: Select all

import HighchartsMore from 'highcharts/highcharts-more'

HighchartsMore(Highcharts)
Demo: https://stackblitz.com/edit/react-neuvzd?file=index.js
How to add a module in React: https://github.com/highcharts/highchart ... d-a-module
API reference: https://api.highcharts.com/highcharts/s ... umnpyramid

Let me know if that was what you were looking for!
Best regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”