-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't access this.props in load #33
Comments
try something like this render(){
let self=this;
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 = self.props.y
series.addPoint([x,y], true, true);
}, 900);
}
}
},
title: {
text: 'Live random data'
}
}
} let me know if this worked for you, and thanks in advance for using the component |
Hello Nidhi-tandon, Any update on this issue? Because I am trying to do the similar thing. I would appreciate if you post your solution to this forum. I tried the suggested solution above and it didn't work for me. |
I dont know how to solve it but what happens is that the complete object is parsed inside the html then concatenated, so the text would be literal not connecting the variables because in the html cant find the variable self.props.y, try passing it as a string maybe |
Closing this as I have lost context of this issue. |
Cant access this.props.y in load function and I cant even access constructor variable.
Thanks for the help in advance.
The text was updated successfully, but these errors were encountered: