From: Evert Timberg Date: Tue, 21 Jun 2016 23:57:13 +0000 (-0400) Subject: Use the scale center point for the polar area chart center X-Git-Tag: v2.2.0-rc.1~31^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0871dd96a5e69dbc33427bcaa15212ee04d89144;p=thirdparty%2FChart.js.git Use the scale center point for the polar area chart center --- diff --git a/src/controllers/controller.polarArea.js b/src/controllers/controller.polarArea.js index db36a24c1..4a22482b4 100644 --- a/src/controllers/controller.polarArea.js +++ b/src/controllers/controller.polarArea.js @@ -139,8 +139,8 @@ module.exports = function(Chart) { var labels = chart.data.labels; var circumference = me.calculateCircumference(dataset.data[index]); - var centerX = (chartArea.left + chartArea.right) / 2; - var centerY = (chartArea.top + chartArea.bottom) / 2; + var centerX = scale.xCenter; + var centerY = scale.yCenter; // If there is NaN data before us, we need to calculate the starting angle correctly. // We could be way more efficient here, but its unlikely that the polar area chart will have a lot of data