0
render(){
let conf={
chart: {
type: 'spline',
animation: Highcharts.svg, // don't animate in old IE
marginRight: 10,
events: {
load:function(){
var series = this.series[0];
setInterval(() =>{
var x = new Date().getTime() // current time
y = this.props.y
series.addPoint([x,y], true, true);
}, 900);
}
}
},
title: {
text: 'Live random data'
}}}
的負載,我無法訪問this.props.y負載的功能內,甚至沒有任何構造函數的變量。 我曾嘗試使用箭頭函數而不是函數然後圖形顯示什麼都沒有。提前不能訪問this.props在highcharts