highcharts 没有导出成员“ChartObject”

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

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

highcharts has no exported member 'ChartObject'

我已经尝试过, 角高图表, Highcharts-angualr, ng2-highcharts,

import { chart } from 'highcharts';
import * as Highcharts from 'highcharts';
angular typescript highcharts
2个回答
2
投票

使用

Chart
类型代替
ChartObject

import * as highcharts from 'highcharts';

const myChart: highcharts.Chart;

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

0
投票

出现错误,因为 Highcharts 模块未导出 DataPoint、ElementObject、IndividualSeriesOptions、PointEvents、PointObject、SeriesTooltipOptions、TreeMapChartSeriesOptions 成员

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