Hi Viz,

I am creating on app using GWT and Viz API.
 The scenario is as follows:

1. The page has a search panel and a chart panel

2. When user selects some search criteria and clicks search, the
request goes to server and the responded data is rendered to the
chart. Now this piece of code to create chart is on the fly. The chart
is created everytime the response is received for the new search
criteria and hence I have to load the API on each new search.

I think, the the code is retricting the API to reload newly.

Here is the code snippet:

tempColumnChart.setPixelSize(500, 500);

                                mainChartVPanel.add(tempColumnChart);
                                
mainChartVPanel.setCellHorizontalAlignment(tempColumnChart,
                                                
HasHorizontalAlignment.ALIGN_CENTER);
                                
mainChartVPanel.setCellVerticalAlignment(tempColumnChart,
                                                HasVerticalAlignment.ALIGN_TOP);
                                mainChartVPanel.setCellWidth(tempColumnChart, 
"100%");
                                mainChartVPanel.setCellHeight(tempColumnChart, 
"100%");

                                flexTablePanel = new 
FlexTablePanel(ChartPanel.this,
                                                mainChartType);
                                flexTablePanel.createPanel();

                                mainChartVPanel.add(flexTablePanel);
                                
mainChartVPanel.setCellHorizontalAlignment(flexTablePanel,
                                                
HasHorizontalAlignment.ALIGN_LEFT);
                                
mainChartVPanel.setCellVerticalAlignment(flexTablePanel,
                                                
HasVerticalAlignment.ALIGN_BOTTOM);

                        }
                };
                try {
                        VisualizationUtils.loadVisualizationApi(onLoadCallback,
                                        ColumnChart.PACKAGE);
                } catch (Exception e) {
                        GWT.log("ERROR");
                }

Thanks
Ankit

On Mar 23, 11:52 am, Viz Kid <[email protected]> wrote:
> Hi Ankit.
>
> Can you give a live example which demonstrates the problem?
> It seems not to happen on a simple visualization such as given 
> here:http://gwt.google.com/samples/HelloVisualization-1.0.2/HelloVisualiza...
>
> Best,
>   Viz Kid
>
>
>
> On Tue, Mar 23, 2010 at 4:59 PM, Anky <[email protected]> wrote:
> > I have found the root cause. When I hit the browser refresh button,
> > the Visualization API does not get unload. Hence the next time i click
> > button to generate chart, the chart does not get displayed. If I clear
> > the browser history data and visit the link, it works perfectly fine.
> > Looks to be caching issue
>
> > Is there any way to unload the Visualization API on the page unload ?
>
> > For your reference - I am creating an application using GWT and
> > Visualization API
>
> > Thanks
> > Ankit
>
> > On Mar 22, 11:59 am, Anky <[email protected]> wrote:
> > > Hi,
>
> > > I am facing this issue since last week. Whenever I make a code change,
> > > the code works fine. It shows proper log from server but the chart is
> > > not getting displayed on the screen. What type of problem is this? It
> > > was working fine earlier.
> > > Also when I debug the application, the control should go to the
> > > runnable's run method after this statement:
> > > VisualizationUtils.loadVisualizationApi(onLoadCallback,
> > >                                 ColumnChart.PACKAGE);
> > > but it skips the whole runnable block of the code.
>
> > > Thanks
> > > Ankit
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Visualization API" group.
> > To post to this group, send email to
> > [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-visualization-­api%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-visualization-api?hl=en.- Hide quoted 
> >text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to