Angular6,highcharts错误“node_modules / highcharts / highcharts.d.ts中的错误(128972,17)'PlotNetworkDataLabelsFormatterCallbackFunction'。”

问题描述 投票:0回答:2

我试图通过以下步骤配置Angular6的高级图表:

Step 1 : npm install highcharts-angular --save
Step 2 : Add HighchartsChartModule in app.module.ts under imports
imports: [
HighchartsChartModule
]
Add import statement'import { HighchartsChartModule } from 'highcharts-angular';
Step 3 : npm install highcharts --save

在此之后,当我构建我的应用程序时,它给我以下错误


ERROR in node_modules/highcharts/highcharts.d.ts(128972,17): error TS2304: Cannot find name 'PlotNetworkDataLabelsFormatterCallbackFunction'.
node_modules/highcharts/highcharts.d.ts(128982,21): error TS2304: Cannot find name 'PlotNetworkDataLabelsFormatterCallbackFunction'.
node_modules/highcharts/highcharts.d.ts(128987,19): error TS2304: Cannot find name 'PlotNetworkDataLabelsTextPath'.
node_modules/highcharts/highcharts.d.ts(128992,15): error TS2304: Cannot find name 'PlotNetworkDataLabelsTextPath'.
node_modules/highcharts/highcharts.d.ts(136653,17): error TS2304: Cannot find name 'PlotPackedBubbleDataLabelsFormatterCallbackFunction'.
node_modules/highcharts/highcharts.d.ts(136658,15): error TS2304: Cannot find name 'PlotPackedBubbleDataLabelsTextPath'.
node_modules/highcharts/highcharts.d.ts(237720,14): error TS2304: Cannot find name 'SeriesOrganizationNodesLayoutValues'.


我的package.json如下所示

Package.json 

 "dependencies": {
        "@agm/core": "^1.0.0-beta.3",
        "@angular/animations": "6.1.0",
        "@angular/cdk": "^6.4.1",
        "@angular/common": "6.1.0",
        "@angular/compiler": "6.1.0",
        "@angular/core": "6.1.0",
        "@angular/flex-layout": "^6.0.0-beta.18",
        "@angular/forms": "6.1.0",
        "@angular/http": "6.1.0",
        "@angular/material": "^6.4.1",
        "@angular/material-moment-adapter": "^6.4.1",
        "@angular/platform-browser": "6.1.0",
        "@angular/platform-browser-dynamic": "6.1.0",
        "@angular/router": "6.1.0",
        "@types/googlemaps": "^3.30.11",
        "angular-highcharts-chart": "^1.0.2",
        "core-js": "^2.5.7",
        "file-input-accessor": "^2.0.0",
        "hammerjs": "^2.0.8",
        "highcharts": "^7.1.0",
        "highcharts-angular": "^2.4.0",
        "moment": "^2.22.2",
        "moment-business-days": "^1.0.6",
        "ngx-cookie": "^4.1.2",
        "ngx-storage": "^0.5.0",
        "ngx-webstorage": "^2.0.1",
        "rxjs": "^6.4.0",
        "rxjs-compat": "^6.2.2",
        "rxjs-tslint": "^0.1.5",
        "zone.js": "^0.8.26"
    },

我真的坚持这个设置!任何帮助都非常感谢!!提前致谢 !!

npm highcharts angular6
2个回答
0
投票

将高图表版本更改为7.0.3

npm install [email protected]

它工作正常。


0
投票

安装版本7.0.3的高级图表适合我。

npm install [email protected]

谢谢 !!

© www.soinside.com 2019 - 2024. All rights reserved.