angular2-highcharts: Chart is unknown chart type

After going through a lot of troubles trying to import the angular2-highcharts module in my ionic2 application, I’m now having this error at runtime:

'Chart is unknown chart type'

basically it is raised from initChart.js :

 if (!highchartsService.Highcharts[type]) {
    throw new Error(type + " is unknown chart type.");
}

the highchartsService is an empty object.

Any idea why ?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 21

Most upvoted comments

Thank you @howtimeflies-io It’s just what was missing! Now what I am going to try is to feed the data from a service rest.

@jmerazhn

Just add a single line bellow the imports.

declare let require: any;