When I put another exported mock data in which is exact same values as is in data keys with Observable or even non observable javascript array, it works just fine. But it’s not the case for graphs[i].data
I also made graphs non-observalbe and it gives the same error for only dataseries.data part. Other fields are working.
Created javascript object list that returns graphs fields and its data value as observable. Just how error log asks. However if I don’t use it in each it doesn’t ask for it to be observable.
And each keyword with dataseries are working now. But still I like to know reasons if that’s makes sense.
I’ve added a feature request to make DataSeries.Data accept arrays from JavaScript as well as Observables.
For now you can wrap them in an Observable though – nested Observables are supported.
I’m positive DataSeries.Data already accepts plain array javascript object as value. Not required to be observable.
I think the problem is in literally created array of javascript object(observable or not), that each of the objects has own fields and as well as data value as javascript array(observable or not), makes it log, that DataSeries.Data should be an Observable. And it doesn’t accept the value.
If I plain do this,
var graphs = {
id: 0
name: "data serie 1",
host: "http://192.168.84.128",
port: 1212,
data: [(3,2,1,3,5)]
}
But in the first post, you can reproduce the error just by copying that code alone.
In official Alive.UX example project, there’s a chart that I copied the data structure. So I was able to use the structure, but when I switched to populate multiple graphs with each method and using array of graph model objects, it gives this error.