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

TypeError: Highcharts is not a constructor #10

Open
manish-wedigtech opened this issue Dec 29, 2017 · 1 comment
Open

TypeError: Highcharts is not a constructor #10

manish-wedigtech opened this issue Dec 29, 2017 · 1 comment

Comments

@manish-wedigtech
Copy link

I wrote this code.

var Highcharts = require('highcharts-server');
var server = new Highcharts(5594);
  1. And Got this error?
  2. How to save this graph to server folder?
@killroyboy
Copy link

  1. You need to require with default afterwards.
var Highcharts = require('highcharts-server').default;
var server = new Highcharts(5594);
  1. The render method returns a base64 encoded string representing the PNG file. You need to convert it into an image and save to disk. Perhaps this npm module will help.

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

2 participants