Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
De-selecting first Legend item stops chart from showing new values
So currently I have 3 dataseries within my chart which has the Timeline option set to true.
I also have new dataseriesitems being added into each of the series every few seconds.
Everything seems to work fine, the chart grows to the right to show the new points being inserted, but when I
click on the first series on the legend to have its visibility removed, the chart stops shifting. If I manually click
and drag the chart to the right I can see the new points that have been added. When I click on the first series
in the legend again to have its visibility returned, the chart starts to move to show the new dataseriesitems.
It seems to only be a problem with the first series on the list, removing the second or third series doesn't stop
the chart from shifting and showing the new values. I've tried switching around the order in which they were
added to the chart and it's whichever series happens to be first on the legend list.
Is this expected behavior? Not sure if there's some setting that's causing this or if this is a bug in vaadin.
Just a couple screen shots to maybe clarify what I mean.
In the "Before" picture you can see a set of values, after a few seconds new data is
added into the series resulting in "After" picture which has new data, noticeably the big
green spike. Now when the blue series (first one on the legend) is clicked to no longer
be visible on the chart, the chart doesn't move like in the pictures to show the new data
even though data is in fact being added.
So by default the Navigator in the TimeLine sets the series to index 0 (first item on the legend). In order to change that I created my own Navigator which extends Navigator and gave it the "baseSeries" field. By modifying the baseSeries index in the navigator I was able to change the series shown in the navigator, thus moving the chart with the new incoming values again.
New question is, can I update the navigator without having to call drawChart()?