Try changing the width of the hpanel to like var hpanel = uiApp.createHorizontalPanel().setWidth(800)
and you may notice the alignment change then.
Aligning google aps script gadget on google page
-
29-05-2022 - |
Вопрос
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:
- clicking the left/center/right icon to modify alignment of the script gadget while editing the page in google site does nothing
- I've tried deploying the app as
UiApp.createApplication()
as-is and then within a horizontal panel with various settings ofHorizontalAlignment
: 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;
Решение
Не связан с StackOverflow