-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namespace 'Highcharts' has no exported member 'ChartCallbackFunction'. Does the current version support angular 5 #107
Comments
Thank you for reporting about the problem. Please check and provide info about: used Highcharts version, used TypeScript type definitions (official provided with Highcharts 7+, official beta definitions for Highcharts 6, legacy definitions from definitely typed, or other). Please create a live demo or provide another way to recreate the problem. Current version of Highcharts (7.0.1) has that member exported as you could check here. P.S. I have edited your comments - because you have ignored the bug report template there's no reason for it to leave it. |
@elninotorres Can you share your package.json? I had the same behaviour until I found out I installed the bad package 'angular-highcharts' next to 'highcharts-angular' :-D After reinstalling from scratch everything is good. |
My issue was that i have "@types/highcharts" installed "^5.0.36", |
Without a way to recreate the problem I can only try to guess what might be wrong. |
I was able to fix this bug by locking my package.json with the following versions:
If you don't need to update highcharts, this could be a solution for you. After locking these versions, we were able to compile our Angular application without errors. |
Thank you for sharing your solution. This way of loading TS types is not advised for Highcharts v6 and above, but please provide details if possible:
|
I am using angular version 5.2.0. |
The highcharts-angular wrapper should work with Angular 2+, but new versions of Angular are used for tests, so in case there's a problem we need to know what versions of Agnular, TS, and Highcharts are used. Major update was made for the wrapper when adapting to Angular v6 - this is the reason of the docs version specification.
More info here: DefinitelyTyped/DefinitelyTyped#22893 |
Hi, I have the same exact problem described. Used versions : "@angular/core": "^7.1.4" |
Hi @yelf06 Highcharts version under 7 might not have complete TS definitions - you could check files from the table in my last comment to be sure. The last version of the wrapper is up to date with the Highcharts, so it's expected to use version 7 or newer of Highcharts. If you want to use older version of Highcharts please use older version of the wrapper - e.g. 2.3.1 or load Highcharts v7+ to supply proper TS definitions for the wrapper as it expects those definitions to be loaded with Highcharts. |
Hi @KacperMadej Thank you for your response. Let suppose I use highcharts 7, could you please provide an example of the dependencies I should use and their versions. I don't think I understood your message correctly. Thank you |
@yelf06 Sure, here's the case: Using Highcharts v7 - TS definitions are provided with the library, so do not load @types/highcharts. Only the Highcharts lib. Here's more info for this case: https://www.highcharts.com/docs/advanced-chart-features/typescript Please let me know if anything is unclear and I will try to provide better or more info. |
Hi @KacperMadej , Thank you for your help. It was a simple as adding this in the ts file :
In the html :
Thank you again |
Hi @KacperMadej ,, ERROR in node_modules/highcharts-angular/lib/highcharts-chart.component.d.ts(8,34): error TS2694: Namespace 'Highcharts' has no exported member 'ChartCallbackFunction'. |
@aravind-ui |
hi @KacperMadej, used versions, "highcharts": "^6.2.0", "@angular/core": "^7.2.3", |
Please use beta declarations instead of the @types/highcharts - https://github.com/highcharts/highcharts-declarations-beta/ As explained in the table here: #107 (comment) |
Closing due to inactivity. |
Hello I still have this problem and can't fix it ? can someone help |
If you have the same problem then you should fix it as instructed in the comments above. |
yarn upgrade angular2-highcharts yarn upgrade angular2-highcharts --latest // the sub-dependency has not changed. yarnpkg/yarn#2394 yarn remove angular2-highcharts yarn add angular2-highcharts after all that.... still nothing: dependencies: "@types/highcharts" "^4.2.47" highcharts "^5.0.7" `yarn dev-up` now fails in highcharts/highcharts-angular#107 someone mentioned that setting the version # fixed the issue. Reverted the version number to 2.0.0: `yarn add highcharts-react-official@2.0.0`
If you're using angular-highcharts version 7 or above, makes sure to remove @types/highcharts dependency, it worked for me. |
Hi, I am using Angular 11 having this issues. connect with support team on Skypee but did't find any solution. This version working fine "highcharts": "^9.0.1", . But latest version not working. Also remove @types/highcharts As recommended by Highchart support team |
For now, for Angular 11/12 please use the 2.10.0 version of |
I am currently using angular 5.2.0.
I imported the modules as per the file, and i am not able to serve my application due to an error
ERROR in ../node_modules/highcharts-angular/lib/highcharts-chart.component.d.ts(8,34): error TS2694: Namespace 'Highcharts' has no exported member 'ChartCallbackFunction'.
The text was updated successfully, but these errors were encountered: