AnnotatedTimeLine in GWT vs. JS: Different behaviors, doh!

22 views
Skip to first unread message

Cesium

unread,
Jul 30, 2011, 9:10:27 PM7/30/11
to google-visua...@googlegroups.com
I use AnnotatedTimeLine in Javascript like this:

google.load('visualization', '1', {packages: ['annotatedtimeline']});

and this:

annotatedtimeline.draw(data, {'allowRedraw': true});

and it draws the new data with no flicker and no repainting of the chart. I love it.
(It also seems to maintain a map of all data added from subsequent calls to draw and that's most excellent.)

So now I'm moving to GWT, so I do this:

AnnotatedTimeLine.Options options = AnnotatedTimeLine.Options.create();
options.setAllowRedraw(true);

and:

final AnnotatedTimeLine atl= new AnnotatedTimeLine(data, options, "600px", "500px");
dockPanel.add(atl, DockPanel.CENTER);

with subsequent calls like:

atl.draw(data, options);

and it behaves differently. The chart is erased and completely redrawn with only the new data that has been provided in the
current call to draw.

What am I missing here? Are there new default values to some options that I'm not setting?
The GWT wrapper loads the same visualization right? What gives?

David


Cesium

unread,
Jul 31, 2011, 11:47:23 AM7/31/11
to google-visua...@googlegroups.com
I'm really sorry guys. I changed a bunch of stuff all at once (I'm a really lame Java programmer) and now it behaves fine.
I've been a C++ guy since 1994, so these "new"s with interfaces and function definitions and the scope of vars they can access
is really messing with my head.

shamefully,
David

Reply all
Reply to author
Forward
0 new messages