tel8618217223380 / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

viz is truncated by tab panel #217

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
many of the GWT visualizations appear truncated if they are placed in a tab
panel in any position but the first.  for example:

    tabPanel.add(AreaChart.createWidget(data, areaOptions), "Area Chart");
    tabPanel.add(BarChart.createWidget(data, barOptions), "Bar Chart");

since the bar chart is second, the bar chart is truncated.  but if you put
the bar chart first, like this:

    tabPanel.add(AreaChart.createWidget(data, areaOptions), "Area Chart");
    tabPanel.add(BarChart.createWidget(data, barOptions), "Bar Chart");

then the area chart is truncated.

Original issue reported on code.google.com by daniel.l...@gmail.com on 25 Nov 2008 at 9:16

GoogleCodeExporter commented 9 years ago

Original comment by daniel.l...@gmail.com on 25 Nov 2008 at 9:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Updating account names

Original comment by zundel@google.com on 21 Dec 2009 at 2:00

GoogleCodeExporter commented 9 years ago
I met this problem too.

Original comment by koujun1...@gmail.com on 30 Dec 2009 at 7:57

GoogleCodeExporter commented 9 years ago
it appears that this is related to the sizing of the html "container" div 
element.  
somehow, the behavior of the tab panel causes the chart to be drawn with the 
wrong 
size. someone suggested that LazyPanel might help.

also, it seems that the chart is drawn correctly on internet explorer.

Original comment by dglibi...@google.com on 30 Dec 2009 at 8:27

GoogleCodeExporter commented 9 years ago
I'm encountering this issue as well, so I guess it still hasn't been solved?  
Has anyone got a workaround? Thanks.

Original comment by cormac.m...@gmail.com on 18 Nov 2010 at 5:45

GoogleCodeExporter commented 9 years ago
I met this problem as well.

One workaround that seems to work for me is the following:
Draw or redraw the visualization after having selected the tab.

@UiHandler("tabPanel")
void handleSelect(SelectionEvent<Integer> e) {
    /* redraw only when switching to tab that contains visualization */
    if (e.getSelectedItem() == 1) {
        Scheduler.get().scheduleDeferred(new ScheduledCommand() {
            @Override
            public void execute() {
                drawVisualization();
            }
        });
    }
}

Original comment by san...@gmail.com on 1 Dec 2010 at 3:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
In my case, I noticed that this problem occurred when I performed other methods 
before the method that creates the map ... Positioned to execute the method 
that creates the map at the end and is working well.

Original comment by juarezna@gmail.com on 24 Aug 2012 at 1:37