我正在尝试创建蜘蛛图表。我使用this
`import { CHART_DIRECTIVES, Highcharts } from 'angular2-highcharts';
import HighchartsMore from 'highcharts/highcharts-more';
HighchartsMore(Highcharts);
...`
答案 0 :(得分:1)
简单地这样做,它对我起作用我正在试图获得测量图..这对我有用,并为你设置极地获取蜘蛛图
声明图表模块就像这样
import { ChartModule} from 'angular2-highcharts';
imports
@NgModule({
declarations: [...],
imports: [
ChartModule,
....
],
并在导出类页面上,您要调用highchart
import * as Highcharts from 'highcharts';
import * as HighchartsMore from 'highcharts/highcharts-more';
HighchartsMore(Highcharts);
export class component {
constructor(public navCtrl: NavController) {
this.chart1 = {
chart:{
polar: true,
type:'line',
backgroundColor:'rgba(255, 255, 255, 0)',
},
title : { text : 'simple chart' },
series: [{
data: [29.9, 71.5, 106.4, 129.2],
}]
};
}
chart1: Object;
html代码
<chart [options]="chart1" > </chart>