Commit ca5d46ae authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

http://bugzserver/show_bug.cgi?id=25199 - Некорректная вставка диаграммы типа "pie"

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57119 954022d7-b5bf-4e40-9824-e11837661b57
parent abe3bcd3
......@@ -3791,22 +3791,27 @@ drawPieChart.prototype =
var numCache = this.chartProp.series[0].val.numRef ? this.chartProp.series[0].val.numRef.numCache.pts : this.chartProp.series[0].val.numLit.pts;
var sumData = this.cChartDrawer._getSumArray(numCache, true);
var radius = Math.min(trueHeight, trueWidth)/2;
var xCenter = this.chartProp.chartGutter._left + trueWidth/2;
var yCenter = this.chartProp.chartGutter._top + trueHeight/2;
this.tempAngle = Math.PI/2;
//рисуем против часовой стрелки, поэтому цикл с конца
var angle;
for (var i = numCache.length - 1; i >= 0; i--) {
var angle = Math.abs((parseFloat(numCache[i].val / sumData)) * (Math.PI * 2));
angle = Math.abs((parseFloat(numCache[i].val / sumData)) * (Math.PI * 2));
if(!this.paths.series)
this.paths.series = [];
this.paths.series[i] = this._calculateSegment(angle, radius, xCenter, yCenter);
}
this.paths.series[i] = this._calculateSegment(angle, radius, xCenter, yCenter);
};
},
_calculateSegment: function (angle, radius, xCenter, yCenter)
{
if(isNaN(angle))
return null;
var startAngle = (this.tempAngle);
var endAngle = angle;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment