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