I've create a google apps script chart which looks fine when I run publish > deploy > Test web app for your latest code
.
However, once it's inserted as script gadget on a page of a google site, I can't modify its horizontal alignment:
UiApp.createApplication()
as-is and then within a horizontal panel with various settings of HorizontalAlignment
: nothing changes.Creating charts with google apps script is easy enough, but aligning the results on a google page is frustrating.
uiApp = UiApp.createApplication().setTitle('TheTitle').add( chart );
var hpanel = uiApp.createHorizontalPanel()
hpanel.add(chart).setHorizontalAlignment(UiApp.HorizontalAlignment.LEFT)
uiApp.add(hpanel);
return uiApp;
Try changing the width of the hpanel to like var hpanel = uiApp.createHorizontalPanel().setWidth(800)
and you may notice the alignment change then.