Use the scale center point for the polar area chart center

This commit is contained in:
Evert Timberg 2016-06-21 19:57:13 -04:00
parent ebaade5d16
commit 0871dd96a5

View File

@ -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