From: Evert Timberg Date: Sun, 20 Sep 2015 14:34:40 +0000 (-0400) Subject: Update charts with default aspect ratio of 1 where it makes sense. If the canvas... X-Git-Tag: 2.0.0-alpha4~21^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1470%2Fhead;p=thirdparty%2FChart.js.git Update charts with default aspect ratio of 1 where it makes sense. If the canvas has no size specified, this will be used --- diff --git a/src/charts/Chart.Doughnut.js b/src/charts/Chart.Doughnut.js index ccea714f3..333a0bbeb 100644 --- a/src/charts/Chart.Doughnut.js +++ b/src/charts/Chart.Doughnut.js @@ -6,6 +6,7 @@ var helpers = Chart.helpers; var defaultConfig = { + aspectRatio: 1, legendTemplate: "", }; diff --git a/src/charts/Chart.PolarArea.js b/src/charts/Chart.PolarArea.js index 7070a0d8f..9dbdf1b39 100644 --- a/src/charts/Chart.PolarArea.js +++ b/src/charts/Chart.PolarArea.js @@ -6,6 +6,7 @@ var helpers = Chart.helpers; var defaultConfig = { + aspectRatio: 1, legendTemplate: "", }; diff --git a/src/charts/Chart.Radar.js b/src/charts/Chart.Radar.js index f5580783d..2f1f82606 100644 --- a/src/charts/Chart.Radar.js +++ b/src/charts/Chart.Radar.js @@ -5,7 +5,12 @@ var Chart = root.Chart; var helpers = Chart.helpers; + var defaultConfig = { + aspectRatio: 1, + }; + Chart.Radar = function(context, config) { + config.options = helpers.configMerge(defaultConfig, config.options); config.type = 'radar'; return new Chart(context, config);