0👍
When assigning your data to Data
and Labels
, you should parse the string into an array
using JSON.parse()
.
Instead of this…
result.forEach(x => {
this.Data.push(x.data);
this.Labels.push(x.labels);
});
do this:
result.forEach(x => {
this.Data = JSON.parse(x.data);
this.Labels = JSON.parse(x.labels);
});
Source:stackexchange.com