nisaanwaarr
Posts: 12
Joined: Tue Oct 04, 2022 9:12 pm

Cannot read properties of undefined (reading 'forExport')

Hi, We are using offline export of highcharts, after exporting chart to any format whenever we route to another component we face below exception in console.
Updating highcharts is not an option.
Other solutions mentioned in this forum for same issue dont seem to work either
angular-highcharts": "8.0.1",
Angular 11.2.14
highcharts:7.1.2
I have tried using all solutions. Even remaking the chart is not helping either.
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Cannot read properties of undefined (reading 'forExport')

Hello there,

Welcome to our forum and thank you for contacting us with your question!

Unfortunately, we won't be able to help you with that case since angular-highcharts is not our official wrapper. I'd suggest switching to highcharts-angular, and see if the same error occurs.
Official Highcharts Angular wrapper: https://github.com/highcharts/highchart ... installing

In case of any questions regarding Highcharts functionality, please do not hesitate to contact us,
Best regards!
Kamil Musiałowski
Highcharts Developer
nisaanwaarr
Posts: 12
Joined: Tue Oct 04, 2022 9:12 pm

Re: Cannot read properties of undefined (reading 'forExport')

The same issue occurs on using highcharts-angular as well.
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Cannot read properties of undefined (reading 'forExport')

Could you please reproduce this issue in an online editor, like Stackblitz or Codesandbox?

We will have a look into that and try to do the offline exporting on our side, to see if we can find a solution to this problem.

Thank you!
Kamil Musiałowski
Highcharts Developer
nisaanwaarr
Posts: 12
Joined: Tue Oct 04, 2022 9:12 pm

Re: Cannot read properties of undefined (reading 'forExport')

Can you refer to the demos here?
they are facing the same exception on routing. and have shared demo as well.
In our case its just reproducible after calling export and then using routing.
https://github.com/highcharts/highchart ... issues/231
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Cannot read properties of undefined (reading 'forExport')

Hi there,

I have forwarded your request to our GitHub team, so please pay attention to the topic that you have linked in your post and wait for an answer there.

Best regards!
Kamil Musiałowski
Highcharts Developer
nisaanwaarr
Posts: 12
Joined: Tue Oct 04, 2022 9:12 pm

Re: Cannot read properties of undefined (reading 'forExport')

I have produced similar issue on stackblitz and posted a new issue on github as well.
Please see this url, click on create chart, export and wait for am alert popup. After alert when a chart object is set to null (which will happen whenever we route as well)
Forexport error is thrown.
https://stackblitz.com/edit/angular-hig ... mponent.ts
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Cannot read properties of undefined (reading 'forExport')

Hello there,

Thank you for creating the GitHub issue and pasting a link here. Right now it will be much easier for future Highcharts users to track the fix if they encounter the same error in the future.

As for now, I would suggest patiently waiting for an answer there, to avoid creating double posts.
Also please remember, that we don't work during the weekends (CET Time), that's why you didn't get any updates.

Thank you for your patience,
Best regards!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Usage”