Open jorgenevil opened 8 years ago
We can't sample timeseries from two different datasets in the same chart. So the real solution to this problem is to join
two tables. This functionality will come soon, but is not ready yet.
No, we cannot sample from two datasets, but it's still a bug: If you have two layers in a project, let's say Akersvattn + Kongsberg, and activate both of them on the same project, the graph will sample from only one of the layers. The image below shows data over Kongsberg.
This seems to be a little more complicated than I anticipated. Now, the draw sampler will only sample data from the _first_ layer activated, ignoring all other layers that gets activated _after_ that. (I think it's a bit strange that it's not the other way around).
However, we need to be able to sample from the correct layer, without having to merge the datasets. I don't know what's a more practical solution to do this:
Check the bounds of the dataset, and sample from there? Check active layers for data, and ignore the ones that gives zero as a result?
Any suggestions?
Here is the layer it samples from (which is always the first one activated) https://github.com/systemapic/systemapic.js/blob/ceb3c3590b1ba8dd89a271e73279cd4c030c3550/js/src/controls/control.draw.js#L88
If two layers are selected, and user samples data with polygon draw tool to show average value in graph, the graph will only display data from the first layer that was activated, giving
0
as a result for points in the second layer.I.e. in the screen shot below: data under draw polygon is in
...part2.zip
while graph shows data from...part1.zip