Hi,
I have several Google Charts embedded as gadgets in a Google site. I have
used the old API system. Does anyone know how I set the charts to resize
automatically based on the screen size that of the user? At the moment the
charts look fine in my screen but when another user uses them on a screen
with a diff resolution parts of the chart get cut off.
Code for the charts is below.
Thanks
Scott
function doGet() {
var ss = SpreadsheetApp.openById('SHEET ID');
var data = ss.getDataRange();
var periodFilter =
Charts.newNumberRangeFilter().setFilterColumnIndex(5).build();
var tableChart = Charts.newTableChart()
.setDataViewDefinition(Charts.newDataViewDefinition().setColumns([2,3,4,5,6,7,8,9,10,11]))
.build();
var dashboard = Charts.newDashboardPanel().setDataTable(data)
.bind([periodFilter], [tableChart])
.build();
var app = UiApp.createApplication();
var filterPanel = app.createVerticalPanel();
var chartPanel = app.createHorizontalPanel();
filterPanel.add(periodFilter).setSpacing(10);
chartPanel.add(tableChart);
dashboard.add(app.createHorizontalPanel().add(filterPanel).add(chartPanel));
app.add(dashboard);
return app;
}
--
This e-mail and any attachments are confidential and solely for the use of
the intended recipient. They may contain material protected by legal
professional or other privilege. If you receive it in error, please delete
it from your system, make no copies of it, do not disclose its contents to
any third party or use it for your own or any other person's benefit.
Please advise the sender of its receipt as soon as possible. Although this
email and its attachments are believed to be free of any virus or other
defect, it is the responsibility of the recipient to ensure that they are
virus free and no responsibility is accepted by the company for any loss or
damage arising from receipt or use thereof. Any opinions expressed that do
not relate to the official business of the company are those of the author,
not the United Biscuits group of companies.
United Biscuits (UK) Limited Registered in England number 2506007
Registered Office: Hayes Park, Hayes End Road, Hayes, Middlesex, UB4 8EE
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/8cce4823-02f9-43fa-8782-606b526944e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.