score:6

Accepted answer

Faced the same issue. Highcharts released a new version 7.1.0 two days back. They have fixed an issue(10232) which is causing this error. You can use https://code.highcharts.com/5.0.14/modules/solid-gauge.js this particular version instead of the latest one. It's working for me now.

score:0

Yes I was also facing the same issue... i have resolved it by replacing js files with updated version Highcharts JS v7.2.1

score:0

Happened to me when I was trying to use react-highcharts. To resolve this, I switched to highcharts-react-official instead:

import React from "react";
import { render } from "react-dom";
// Import Highcharts
import Highcharts from "highcharts";
import HighchartSankey from "highcharts/modules/sankey";
import HighchartsWheel from "highcharts/modules/dependency-wheel";
import HighchartsReact from "highcharts-react-official";

HighchartSankey(Highcharts);
HighchartsWheel(Highcharts);

const Viz = () => {
  return (
    <HighchartsReact
      highcharts={Highcharts}
      options={{
        series: [{
          type: "dependencywheel",
          data: [{
            from: "Category1",
            to: "Category2",
            weight: 2
          }, {
            from: "Category1",
            to: "Category3",
            weight: 5
          }]
        }]
      }}
    />
  );
};

render(<Viz />, document.getElementById("root"));

score:6

If you encounter this error, you might want to check that your app is not server rendered. In the case that it is server rendered then the following should fix the issue:

Check that highcharts is a type of 'object', because on the server it is of type 'function'. If it is an object then you want to execute the module you want. Kindly see below:

import Highcharts from 'highcharts/highcharts';
import HighchartsReact from 'highcharts-react-official';
import highchartsBellCurve from 'highcharts/modules/histogram-bellcurve';

if (typeof Highcharts === 'object') {
  highchartsBellCurve(Highcharts); // Execute the bell curve module
}

Related Query

More Query from same tag