【发布时间】:2018-12-04 12:21:52
【问题描述】:
我正在尝试在 Angular 6 打字稿模块文件 app.module.ts 中导入 highcharts-annotations。我尝试了下面的代码,但它显示错误
“找不到模块'highcharts/module/annotations'的声明文件”
但annotations.js 文件位于同一路径中,并且在控制台中显示错误
“错误类型错误:chart.addAnnotation 不是函数”。
以前有人试过吗?
代码:
import { ChartModule } from 'angular2-highcharts';
import { AnnotationsModule } from 'highcharts/modules/annotations';
import * as Highcharts from 'highcharts';
【问题讨论】:
标签: javascript angular typescript highcharts