In the codebase I work in, we have react-highcharts rather than highcharts-react-official and I am trying to enable highcharts export functionality.
I went to the react-highcharts doc and it says to use deprecated libraries - http://kirjs.github.io/react-highcharts/more.html
Does anyone know how I can use export functionality without using highcharts-exporting and highcharts-more since they are deprecated, with react-highcharts instead of highcharts-react-official?
Try this:
// Import Highcharts
import Highcharts from "highcharts";
// Load Highcharts modules
require("highcharts/modules/exporting")(Highcharts);
Example with highcharts-react-official:
If you are using Next js, try this.
import Highcharts from 'highcharts'
import HighchartsExporting from 'highcharts/modules/exporting'
import HighchartsReact from 'highcharts-react-official'
if (typeof Highcharts === 'object') {
HighchartsExporting(Highcharts)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With