I have the problem where if I use static Data the chart is plotted. But when I get the data from a service it is not plotted even if the static data is assigned in the subcribe. I know that the data is coming through the webservice via the console.log.
The Syncfusion chart is v17.4.55
ngOnInit() {
// this.chartData = [
// { unixDateTime: new Date(1520731920000), yvalue: 154 },
// { unixDateTime: new Date(1544323380000), yvalue: 144 },
// { unixDateTime: new Date(1545286980000), yvalue: 134 }
// ];
var webservice = this.httpService.get(this.SERVICE_URL);
webservice.subscribe(
data => {
console.log(data)
data.forEach(element => {
element["unixDateTime"] = new Date(element["unixDateTime"] * 1000);
});
this.chartData = data;
// this.chartData = [
// { unixDateTime: new Date(1520731920000), yvalue: 154 },
// { unixDateTime: new Date(1544323380000), yvalue: 144 },
// { unixDateTime: new Date(1545286980000), yvalue: 134 }
// ];
});
}