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

http://bugzserver/show_bug.cgi?id=25463 - Отсутствует содержимое листов и...

http://bugzserver/show_bug.cgi?id=25463 - Отсутствует содержимое листов и возникают ошибки в консоли при переходе на них в XLS книге

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57430 954022d7-b5bf-4e40-9824-e11837661b57
parent 95bf33d7
......@@ -3803,7 +3803,10 @@ drawPieChart.prototype =
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);
if(sumData === 0)//TODO стоит пересмотреть
this.paths.series[i] = this._calculateEmptySegment(radius, xCenter, yCenter);
else
this.paths.series[i] = this._calculateSegment(angle, radius, xCenter, yCenter);
};
},
......@@ -3824,6 +3827,33 @@ drawPieChart.prototype =
return path;
},
_calculateEmptySegment: function(radius, xCenter, yCenter)
{
var path = new Path();
var pathH = this.chartProp.pathH;
var pathW = this.chartProp.pathW;
var gdLst = [];
path.pathH = pathH;
path.pathW = pathW;
gdLst["w"] = 1;
gdLst["h"] = 1;
var pxToMm = this.chartProp.pxToMM;
var x0 = xCenter + radius*Math.cos(this.tempAngle);
var y0 = yCenter - radius*Math.sin(this.tempAngle);
path.moveTo(xCenter /pxToMm * pathW, yCenter / pxToMm * pathH);
path.lnTo(x0 / pxToMm * pathW, y0 / pxToMm * pathH);
path.arcTo(radius / pxToMm * pathW, radius / pxToMm * pathH, this.tempAngle, this.tempAngle);
path.lnTo(xCenter / pxToMm * pathW, yCenter / pxToMm * pathH);
path.recalculate(gdLst);
return path;
},
_calculateArc : function(radius, stAng, swAng, xCenter, yCenter)
{
var path = new Path();
......
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