Frage

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:

  1. clicking the left/center/right icon to modify alignment of the script gadget while editing the page in google site does nothing
  2. I've tried deploying the app as 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;
War es hilfreich?

Lösung

Try changing the width of the hpanel to like var hpanel = uiApp.createHorizontalPanel().setWidth(800) and you may notice the alignment change then.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top