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

Highcharts Error #17 The requested series type does not exist #254

Open
zyMacro opened this issue Mar 27, 2017 · 12 comments
Open

Highcharts Error #17 The requested series type does not exist #254

zyMacro opened this issue Mar 27, 2017 · 12 comments

Comments

@zyMacro
Copy link

zyMacro commented Mar 27, 2017

when I plot an chart whose type is 'solidgauge', It went to an error.
After I search for material,I tried below code , but same error comes.

`var ReactHighcharts = require('react-highcharts');

var HighchartsMore = require('highcharts-more');

HighchartsMore(ReactHighcharts.Highcharts);

var HighchartsExporting = require('highcharts-exporting');

HighchartsExporting(ReactHighcharts.Highcharts);

require('highcharts/js/highcharts-more')(ReactHighcharts.Highcharts);`

How can I deal with it?

@zyMacro
Copy link
Author

zyMacro commented Mar 27, 2017

I have added below code to deal with this problem.
require('highcharts/modules/solid-gauge.js')(ReactHighcharts.Highcharts);

@aaronbeall
Copy link

Ran into the same problem, your workaround nor the one in the readme is working, though. I can render a normal line chart, but I can't render a solid gauge.

@aaronbeall
Copy link

aaronbeall commented May 1, 2017

This ended up working through the initial barrage of runtime errors:

const ReactHighcharts = require("react-highcharts");

require("highcharts/js/highcharts-more")(ReactHighcharts.Highcharts);
require("highcharts/js/modules/solid-gauge.js")(ReactHighcharts.Highcharts);

const config: Options = {
  chart: {
    type: "solidgauge"
  },
  // ...
}

<ReactHighcharts config={config} />

However, the gauge doesn't render properly. For example, the bar background doesn't render, even if I copy paste the gauge-activity demo config code. The rest of the gauge does render, though the labels and such are mis-aligned. :hurtrealbad:

@lorezzed
Copy link

Import the whole package instead of specific files and it should work ok with the proper styling

// `highcharts-more` needs to load before gauge
require('highcharts-more')(ReactHighcharts.Highcharts)
require('highcharts-solid-gauge')(ReactHighcharts.Highcharts)

@spacedarcy
Copy link

spacedarcy commented Mar 29, 2018

@aaronbeall's solution works for xrange series, but @lorezzed 's does not, as webpack can't resolve the module.

Update: adding
'highcharts-xrange-series': path.resolve(__dirname, 'node_modules/highcharts/modules/xrange-series.js') to webpack's resolve.alias seems to have fixed this.

@yanbeixiang
Copy link

yanbeixiang commented Apr 12, 2018

@spacedarcy hi.
Same configuration, Originally should get the following result: xrange-dome
image

But in ReactHighcharts it is such a result:
image

Do you know why?

@ilyjs
Copy link
Collaborator

ilyjs commented Apr 12, 2018

Hi @yanbeixiang !
Look at my example
https://stackblitz.com/edit/react-mcob3t

@yanbeixiang
Copy link

@ilyjs thanks. But your example can’t access

image

@ilyjs
Copy link
Collaborator

ilyjs commented Apr 12, 2018

@yanbeixiang sorry!
https://stackblitz.com/edit/react-highcharts-xrange

@yanbeixiang
Copy link

@ilyjs thank you very much.

@rishabh0206
Copy link

rishabh0206 commented Jul 12, 2019

This works if you want to use import instead of require -

import * as Highcharts from "highcharts";
import HighchartsReact from "highcharts-react-official";
import highcharts from "highcharts/modules/bullet";
highcharts(Highcharts);

@1xKarthik
Copy link

1xKarthik commented Oct 18, 2019

This worked for me for React for speedometer/Guage:
https://www.highcharts.com/blog/snippets/speedometer-with-animation/

import Highcharts from 'highcharts';
import HighchartsReact from "highcharts-react-official";
import HC_more from 'highcharts/highcharts-more'
import Guage from "highcharts/modules/solid-gauge";

HC_more(Highcharts);
Guage(Highcharts);

options = {
    chart: {
      type: 'gauge'
    },
}

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

8 participants