From 17cec5297dac037a9aab75ec411badfbe469d5b9 Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Sun, 20 Sep 2015 10:34:40 -0400 Subject: [PATCH] Update charts with default aspect ratio of 1 where it makes sense. If the canvas has no size specified, this will be used --- src/charts/Chart.Doughnut.js | 1 + src/charts/Chart.PolarArea.js | 1 + src/charts/Chart.Radar.js | 5 +++++ 3 files changed, 7 insertions(+) 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); -- 2.47.2