0

I have HighCharts inside a website using vanilla JS, I use webpack/npm to load and import modules. I am able to use the Spline and Column charts just fine. I tried adding the standard Gauge chart (shown here), and received the following error.

Uncaught Error: Highcharts error #17: www.highcharts.com/errors/17/?missingModuleFor=gauge 

When searching for the module in the node_modules/highcarts/modules folder, I cannot find it.

Here is how I am importing HighCharts:

var Highcharts = require('highcharts'); 

Here is how I am calling the chart:

 $('#speedometerContainer').highcharts({ chart: { type: 'gauge', plotBackgroundColor: null, plotBackgroundImage: null, plotBorderWidth: 0, plotShadow: false },... 

This is working for both column and spline chart types.

1 Answer 1

1

I was able to import highcharts-more, which contained the Gauge I needed.

var Highcharts = require('highcharts'); require('highcharts/highcharts-more')(Highcharts); 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.