]> git.ipfire.org Git - thirdparty/Chart.js.git/commit
Fix initial aspect ratio when not responsive
authorSimon Brunel <simonbrunel@users.noreply.github.com>
Fri, 23 Sep 2016 15:43:52 +0000 (17:43 +0200)
committerSimon Brunel <simonbrunel@users.noreply.github.com>
Fri, 23 Sep 2016 15:47:35 +0000 (17:47 +0200)
commit16bcd6adc579cb3deae16ea915680bc219924cdc
treeb74ac1a48a3607070f6083c5dae4480bf9454984
parent8ec7ce2f93a731d53c9330b7ef900a72367ac7aa
Fix initial aspect ratio when not responsive

When responsive is false and no canvas height explicitly set, the aspectRatio option wasn't applied because of the canvas default height. Prevent the retinaScale method to change the canvas display size since this method is called for none responsive charts, but instead make the resize() responsible of these changes. Also, as discussed some time ago, moved most of the core.js logic into core.controller.js. Clean up the destroy process and make sure that initial canvas values are properly saved and restored.
src/core/core.controller.js
src/core/core.helpers.js
src/core/core.js