Timeline: How do I show my data as it comes?

I have the following (attached) application. When you start it runs a thread which add new data in a fixed interval. I read in the forum (cannot link atm) that as long as you modify the container for your timeline object this update the view of the graph. This for some reason doesn’t happen in my case. I am using Vaadin 7.5.4 and

<dependency org="com.vaadin.addon" name="vaadin-charts" rev="3.0.0-alpha4" How can I achieve this?
21054.png
21055.java (10.2 KB)

I don’t know why it happens for you, but it seems this workaround might help. In the run method where you set item property values, call selectFullRange once after setting all the values. Or select some specific range with setVisibleDateRange(Date, Date).

if (firstRun) {
    tl.selectFullRange();
    firstRun = false;
}

Well this work-around solves part of the issue.

  1. If you just run once (using firstRun) it paints the first update and the rest of the data is not showing (update at fixed rate). So we are again at the old issue.
  2. If you run selectFullRange() also at this fixed rate after every addition would update the graph but it makes the browser unusable. You cannot browse the display cause full range is selected every time data comes. Unless I don’t show the browser I don’t see real usage of it.

Did you reproduce this yourself? Does it work for you?

21124.png

I took the Trunk2UI.java you posted and added the modification I posted and the application started to draw results to the timeline leaving the range browser to the place it had for first run results. I used the same versions of Vaadin and Charts as you did.

This is odd what system and java vm do you use. I got

[code]
4.1.0-2-amd64 #1 SMP Debian 4.1.6-1 (2015-08-23) x86_64 GNU/Linux

java version “1.7.0_85”
OpenJDK Runtime Environment (IcedTea 2.6.1) (7u85-2.6.1-1)
OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mod
[/code]I’ll try some more today to see if there are changes…