Fix graphs created in not-displayed divs.

This distinguishes two cases:

- graphs with explicit height/width in graph options. They should
  be drawn correctly after display, no resize needed.

- graphs without explicit height/width are supposed to inherit
  the size from the surrounding div. They needs a .resize()
  call after display.

Tests are included for both.

Fixes issue 238.