Shashidhara
Shashidhara

Reputation: 683

HighChart not displaying 'table' in reactjs

I am using HighChart in reactjs project. It displays chart properly, but it doesn't show table. I am using showTable:true in config.

I have created project in codesandbox. https://codesandbox.io/s/wy2v4p0r5k

Upvotes: 0

Views: 710

Answers (1)

ppotaczek
ppotaczek

Reputation: 39069

You need to import Highcharts exporting and export-data modules:

import Highcharts from "highcharts";

require("highcharts/modules/exporting.js")(Highcharts);
require("highcharts/modules/export-data.js")(Highcharts);

Live demo: https://codesandbox.io/s/yw11p8wpw9

Also, I recommend you to use the highcharts-react-official wrapper, which is officially supported: https://www.npmjs.com/package/highcharts-react-official

Upvotes: 2

Related Questions