shutterstock/rickshaw — pull request #310 by illusori (2013-08-22 17:11:47+00:00)
Title: Only auto resize the y-axis on re-renders, not first render.

Fixes losing args.width on the Y axis due to the auto resize happening before first render.

Chain of events:
* args.width is passed in to initialize.
* setSize is called, setting this.width to args.width.
* render is called, finds that this.graph.height doesn't match the undefined this._renderHeight and does auto setSize.
* auto setSize has no args.width, so cascades to elementWidth, which isn't set because we haven't rendered yet, and cascades onwards to the default berth calculation, trashing the intended args.width value.

Issue only occurred for me in webkit browsers.

Two fixes seem obvious:
* Grandfather in the current value of this.width in the auto-resize, ie: `this.setSize({ width: this.width, auto: true });`
* Don't auto-resize if `this._renderHeight` is undefined, ie: it's initial render.

I've chosen to go with the second option, not sure this is the correct fix however: it works for ours use-case, but the intent of the code isn't entirely clear to me.

There's a similar issue with the X axis, which I've left unfixed given the uncertainty of the correctness of the fix.