source set has to be order by time, if LocalDateTime is used for x-axis
Closed this issue · 3 comments
If LocalDateTime
is used for x-axis function Train
In DateTimePosition
does expect the data to come in ordered already (oldest to youngest). Also in case more than one panel is used the first panel has to start with the oldest data. Otherwise those data will not be shown.
I replaced …
var current = values[values.Count - 1];
if (current.Date == key.Date)
{
current = current.Plus(sampling);
while(current <= key)
{
values.Add(current);
current = current.Plus(sampling);
}
}
else
{
values.Add(key);
}
… with …
for (var pos = values[0].Minus (sampling); pos >= min; pos = pos.Minus (sampling))
{
values.Add (pos);
}
for (var pos = values[values.Count - 1].Plus (sampling); pos <= max; pos = pos.Plus (sampling))
{
values.Add (pos);
}
feel free to use it.
Yes correct, that was a choice by design. Will update documentation accordingly.
You might missed the point of using more than one panel. E.g. using Facet_Wrap
. This leads to unexpected behaviour, as data will not be shown in case not all panels start at the same time. The current implementation will only work on data sources which are sorted and all "streams" (panels) uses the same starting point. Looks like a very narrow road. I suggest the implementation should cover more use cases than just this one.
closed with latest version at https://github.com/jan-ai/GGNet. See my comment on #8