highcharts没有导出的成员'ChartObject'

时间:2019-08-05 12:07:00

标签: angular typescript highcharts

我想为我的angular 4项目设置highcharts,但我不断收到此错误:

highcharts has no exported member 'ChartObject'

我尝试过, 角高图, highcharts-angualr, ng2-highcharts,

import { chart } from 'highcharts';
import * as Highcharts from 'highcharts';

1 个答案:

答案 0 :(得分:1)

使用Chart类型而不是ChartObject

import * as highcharts from 'highcharts';

const myChart: highcharts.Chart;

myChart = hightcharts.chart(someElement, {
...
});