Fix empty histogram during range selection.

I broke this just now in the hidpi pull request...

getCanvas() accidentally cleared the canvas. I've moved the updating of canvas.width/.height into the render method.