我目前正在尝试在Angular2项目中实现Highcharts。不幸的是我收到此错误:找不到名称'HighchartsOptions' 我使用的教程链接。 www.npmjs.com/package/angular2-highcharts#installation
import { Component } from '@angular/core';
@Component({
selector: 'simple-chart-example',
template: `
<chart [options]="options"></chart>
`
})
export class MyChart {
constructor() {
this.options = {
title : { text : 'simple chart' },
series: [{
data: [29.9, 71.5, 106.4, 129.2],
}]
};
}
options: HighchartsOptions; //That's the line where I get the error
enter code here
}
答案 0 :(得分:1)
更改...
options:HighchartsOptions
为...
options:Object;