Persisting graph display through onShow

Hi everyone,

I developed a water level graph (for tides) using drawRectangle(). It's made of 28 rectangles, covering 24 hours.

I would like to persist the display of this graph, however when I copy paste the related code from onUpdate() to onShow(), I get a out of memory error.

The code is pretty thick as I have several nested IFs per rectangle.

Am I supposed to copy the whole code?

Thanks,

Nico