-
1 May 2012 5:36 AM #1
gxt radar chart refresh issue
gxt radar chart refresh issue
I'm getting some weird artifacts when redrawing a gxt radar chart. It looks like the labels are drawn on top of each other until I resize the container. Here's the code:
The forceLayout() command at the end helps somewhat. It's less likely to stack labels on top of each other, but it still happens.Code:onSuccess(Payload result) { store.clear(); store.addAll(result.data); chart.redrawChart(); forceLayout(); }
Note that the labels only get "stacked" when the result.data object contains different a different number of data points (not just different values) from the previous run.
I'll attach a screenshot.
I'm going to try adding this to the end of the onSuccess() call:
But I don't think that should be needed...Code:Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { chart.redrawChart(); forceLayout(); } });
-
1 May 2012 5:51 AM #2
Didn't need to run forceLayout(). What I did need to do was run this:
axis.clear()
before updating the store and before the redrawChart()
-
1 May 2012 1:00 PM #3
Thanks for the report as the axis should adapt to a changing number of data points. I will let you know when it has been fixed.
-
1 May 2012 1:07 PM #4
Cool! Also, I found out I need to clear the radar (Series) object as well or the opacity goes back to the lighter default... So, now I'm clearing all the axes and all series before calling redrawChart()
-
8 May 2012 2:45 PM #5
This has been fixed in SVN and will be in the next release.
-
15 Aug 2012 1:34 PM #6
GXT 3.0.1 has been released and contains this fix.
Success! Looks like we've fixed this one. According to our records the fix was applied for
a bug in our system
in
a recent build.


Reply With Quote