Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use bubble charts (highcharts-more issue) #16

Closed
raquelguimaraes opened this issue Apr 19, 2018 · 2 comments
Closed

How to use bubble charts (highcharts-more issue) #16

raquelguimaraes opened this issue Apr 19, 2018 · 2 comments

Comments

@raquelguimaraes
Copy link

I am unable to create a chart of bubble type.

when I try:

import Highcharts from 'highcharts/highcharts-more'
<HighchartsReact
    highcharts={Highcharts}
    options={options}
/>

with chart type bubble on options I get a type error "highcharts[constructorType] is not a function"

and I get error 17 if I try:

import Highcharts from 'highcharts'
<HighchartsReact
    highcharts={Highcharts}
    options={options}
/>

What's the correct usage when highcharts-more is required? :)

@KacperMadej
Copy link

Hi @raquelguimaraes

The module is loaded, but it needs to be initialized too. You could do this using require - like here:
require('highcharts/indicators/indicators')(Highcharts) - an example in code

or with import like this:

import Highcharts from 'highcharts' //core
import HC_more from 'highcharts/highcharts-more' //module
HC_more(Highcharts) //init module

<HighchartsReact
    highcharts={Highcharts} //pass core after module init
...

For technical support please use: https://www.highcharts.com/support

@louiechristie
Copy link

Also works for creating spider polar chart. And also works when using the npm module highcharts-react-official

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants