我怎樣才能改變angular2-highcharts的背景顏色? 我我的分量,我有:更改背景顏色
chart: any;
saveChart(chart) {
this.chart = chart;
}
constructor(
private eventManager: EventManager,
private locationService: LocationService,
private route: ActivatedRoute,
private alertService: AlertService
){
this.options = {
title: { text: 'Senaste dygnet' },
xAxis: {
type: 'datetime',
title: {
text: 'Tid'
}
},
yAxis: {
title: {
text: 'Temperatur'
}
},
series: [{
name: 'Vattentemperatur',
data: []
}]
};
}
模板:
<chart [options]="options" (load)="saveChart($event.context)"></chart>
當我這樣做this.chart.backgroundColor = 「#000000」 ; 沒有任何反應。
https://jsfiddle.net/gourav012/4ueLkze9/4/ – Gourav