try drawing the BarChart outside of a TabPanel.  there is a known issue that
some Google charts do not play well with the GWT TabPanel.

On Thu, Jul 16, 2009 at 6:53 PM, clanger <[email protected]> wrote:

> See here for screenshot of this bug:
> http://docs.google.com/View?id=df5j4kxv_0hhjtjbgt
>
> On Jun 25, 9:03 am, Bug Chart <[email protected]> wrote:
> > Hi,
> >
> > can you share the exact data that you are using?
> > I think that this is not a GWT problem,
> > but another problem (rendering, or data format maybe).
> >
> > If you can share a link to the HTML page that is being rendered
> > this would be good too.
> >
> > BugChart.
> >
> >
> >
> > On Wed, Jun 24, 2009 at 5:12 PM, clanger <[email protected]>
> wrote:
> >
> > > Using this bar chart:
> > > com.google.gwt.visualization.client.visualizations.BarChart
> >
> > > Get the following error: the data along the Y-axis is cut off.
> >
> > > The data is as follows:
> > > (Team absences table)
> > > Name                              Holiday days taken  Sickness days
> > > taken  Other days taken
> > > An Other
> > > 3                                 1                        3.5
> > > Chester Conventional
> > > 3                                  0                           0
> > > Leftie Lethargic
> > > 7                                 10                           2
> >
> > > Instead of printing each of the 3 names along the Y-axis only 1 or 2
> > > characters of the names is printed eg. "l", "o", "r", should instead
> > > be "An Other" etc.
> >
> > > code snippet below:
> > > =========================
> > > public void onModuleLoad() {
> > > ...
> > > final VerticalPanel vp = new VerticalPanel();
> > >            vp.getElement().getStyle().setPropertyPx("margin", 15);
> > >            RootPanel.get().add(vp);
> > >            vp.add(new Label("Google Visualization with GWT demo."));
> > >            vp.add(tabPanel);
> > >            tabPanel.setWidth("900");
> > >            tabPanel.setHeight("700");
> > >            tabPanel.add(createBarChart(), "Absences Chart");
> > > ....
> > > private Widget createBarChart() {
> >
> > >            final BarChart barChart = new BarChart();
> > >                  String dataUrl = GWT.getModuleBaseURL() +
> > > "servlet/absencereport";
> > >                  Query query = Query.create(dataUrl);
> > >                  query.send(new Callback() {
> >
> > >                public void onResponse(QueryResponse response) {
> > >                        if (response.isError()) {
> > >                          Window.alert("Error in query: " +
> > > response.getMessage() +
> > > ' '
> > >                              + response.getDetailedMessage());
> > >                          return;
> > >                        }
> > >                        BarChart.Options options =
> > > BarChart.Options.create();
> > >                    options.setWidth(700);
> > >                    options.setHeight(240);
> > >                    options.set3D(true);
> > >                    options.setTitle("Team Absences Bar Chart");
> > >                    options.setShowCategories(true);
> > >                        barChart.draw(response.getDataTable(), options);
> > >                    }
> > >             });
> >
> > >                 return barChart;
> > >          }
> >
> > --
> > Nimrod Talmon
> >
>

--~--~---------~--~----~------------~-------~--~----~
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