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