Skip to content
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

Error with Highcharts Angular wrapper in Angular 14 #356

Closed
kintela opened this issue May 16, 2023 · 1 comment
Closed

Error with Highcharts Angular wrapper in Angular 14 #356

kintela opened this issue May 16, 2023 · 1 comment

Comments

@kintela
Copy link

kintela commented May 16, 2023

Hi
I have this in my package.json

"@angular/core": "^14.2.0", "highcharts": "^11.0.1", "highcharts-angular": "^3.1.2"
I have this in app.module.ts

import { HighchartsChartModule } from 'highcharts-angular'; imports: [ HighchartsChartModule,

And this in my component

`<highcharts-chart
[Highcharts]="Highcharts"
[options]="chartOptions"

style="width: 100%; height: 400px; display: block;"

import * as Highcharts from 'highcharts';
Highcharts: typeof Highcharts = Highcharts;
chartOptions: Highcharts.Options = {
series: [{
data: [1, 2, 3],
type: 'line'
}]
};
`
But whe I execute ng serve -o

Error: node_modules/highcharts-angular/lib/highcharts-chart.component.d.ts:24:18 - error TS2707: Generic type 'ɵɵComponentDeclaration' requires between 7 and 8 type arguments.

24 static ɵcmp: i0.ɵɵComponentDeclaration<HighchartsChartComponent, "highcharts-chart", never, { "Highcharts": "Highcharts"; "constructorType": "constructorType"; "callbackFunction": "callbackFunction"; "oneToOne": "oneToOne"; "runOutsideAngular": "runOutsideAngular"; "options": "options"; "update": "update"; }, { "updateChange": "updateChange"; "chartInstance": "chartInstance"; }, never, never, false, never>;

Any idea, please?
Thanks

@karolkolodziej
Copy link
Contributor

In highcharts-angular v3.1.0 we accidentally introduced an issue for older versions of Angular (14 and lower).

In your case please use version 3.0.0- more on that #345

Also please find more information in the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants