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

для построения круговой / кольцевой диаграммы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54811 954022d7-b5bf-4e40-9824-e11837661b57
parent 14f52fc3
...@@ -288,7 +288,7 @@ CChartsDrawer.prototype = ...@@ -288,7 +288,7 @@ CChartsDrawer.prototype =
//count line of chart grid //count line of chart grid
if((chartProp.chart.plotArea.valAx.yPoints && chartProp.chart.plotArea.catAx.xPoints) || (chartProp.chart.plotArea.catAx.yPoints && chartProp.chart.plotArea.valAx.xPoints)) if((chartProp.chart.plotArea.valAx && chartProp.chart.plotArea.catAx && chartProp.chart.plotArea.valAx.yPoints && chartProp.chart.plotArea.catAx.xPoints) || (chartProp.chart.plotArea.catAx && chartProp.chart.plotArea.valAx && chartProp.chart.plotArea.catAx.yPoints && chartProp.chart.plotArea.valAx.xPoints))
{ {
if(chartProp.chart.plotArea.valAx.yPoints) if(chartProp.chart.plotArea.valAx.yPoints)
this.calcProp.numhlines = chartProp.chart.plotArea.valAx.yPoints.length - 1; this.calcProp.numhlines = chartProp.chart.plotArea.valAx.yPoints.length - 1;
...@@ -1017,9 +1017,9 @@ CChartsDrawer.prototype = ...@@ -1017,9 +1017,9 @@ CChartsDrawer.prototype =
//****left***** //****left*****
if(left || !right) if(left || !right)
{ {
if(chartSpace.chart.plotArea.valAx.title != null && !isHBar) if(chartSpace.chart.plotArea.valAx && chartSpace.chart.plotArea.valAx.title != null && !isHBar)
left += chartSpace.chart.plotArea.valAx.title.extX + standartMargin; left += chartSpace.chart.plotArea.valAx.title.extX + standartMargin;
else if(isHBar && chartSpace.chart.plotArea.catAx.title != null) else if(isHBar && chartSpace.chart.plotArea.catAx && chartSpace.chart.plotArea.catAx.title != null)
left += chartSpace.chart.plotArea.catAx.title.extX + standartMargin; left += chartSpace.chart.plotArea.catAx.title.extX + standartMargin;
else else
left += standartMargin / 2; left += standartMargin / 2;
...@@ -1032,9 +1032,9 @@ CChartsDrawer.prototype = ...@@ -1032,9 +1032,9 @@ CChartsDrawer.prototype =
if(right) if(right)
{ {
right += standartMargin / 2; right += standartMargin / 2;
if(chartSpace.chart.plotArea.valAx.title != null && !isHBar) if(chartSpace.chart.plotArea.valAx && chartSpace.chart.plotArea.valAx.title != null && !isHBar)
right += chartSpace.chart.plotArea.valAx.title.extX; right += chartSpace.chart.plotArea.valAx.title.extX;
else if(isHBar && chartSpace.chart.plotArea.catAx.title != null) else if(isHBar && chartSpace.chart.plotArea.catAx && chartSpace.chart.plotArea.catAx.title != null)
right += chartSpace.chart.plotArea.catAx.title.extX; right += chartSpace.chart.plotArea.catAx.title.extX;
} }
else else
...@@ -1044,9 +1044,9 @@ CChartsDrawer.prototype = ...@@ -1044,9 +1044,9 @@ CChartsDrawer.prototype =
//****bottom***** //****bottom*****
if(bottom || !top) if(bottom || !top)
{ {
if(chartSpace.chart.plotArea.catAx.title != null && !isHBar) if(chartSpace.chart.plotArea.catAx && chartSpace.chart.plotArea.catAx.title != null && !isHBar)
bottom += chartSpace.chart.plotArea.catAx.title.extY + standartMargin; bottom += chartSpace.chart.plotArea.catAx.title.extY + standartMargin;
else if(isHBar && chartSpace.chart.plotArea.valAx.title != null) else if(isHBar && chartSpace.chart.plotArea.valAx && chartSpace.chart.plotArea.valAx.title != null)
bottom += chartSpace.chart.plotArea.valAx.title.extY + standartMargin; bottom += chartSpace.chart.plotArea.valAx.title.extY + standartMargin;
else else
bottom += standartMargin / 2; bottom += standartMargin / 2;
...@@ -1059,9 +1059,9 @@ CChartsDrawer.prototype = ...@@ -1059,9 +1059,9 @@ CChartsDrawer.prototype =
if(top) if(top)
{ {
top += standartMargin / 2; top += standartMargin / 2;
if(chartSpace.chart.plotArea.catAx.title != null && !isHBar) if(chartSpace.chart.plotArea.catAx && chartSpace.chart.plotArea.catAx.title != null && !isHBar)
top += chartSpace.chart.plotArea.catAx.title.extY; top += chartSpace.chart.plotArea.catAx.title.extY;
else if(isHBar && chartSpace.chart.plotArea.valAx.title != null) else if(isHBar && chartSpace.chart.plotArea.valAx && chartSpace.chart.plotArea.valAx.title != null)
top += chartSpace.chart.plotArea.valAx.title.extY; top += chartSpace.chart.plotArea.valAx.title.extY;
if(chartSpace.chart.title !== null && !chartSpace.chart.title.overlay) if(chartSpace.chart.title !== null && !chartSpace.chart.title.overlay)
...@@ -1126,7 +1126,7 @@ CChartsDrawer.prototype = ...@@ -1126,7 +1126,7 @@ CChartsDrawer.prototype =
var catAx = chartSpace.chart.plotArea.catAx; var catAx = chartSpace.chart.plotArea.catAx;
if(isHBar === 'HBar' && catAx.yPoints && valAx.xPoints) if(isHBar === 'HBar' && catAx && valAx && catAx.yPoints && valAx.xPoints)
{ {
if(catAx.yPoints.length > 1) if(catAx.yPoints.length > 1)
{ {
...@@ -1184,7 +1184,7 @@ CChartsDrawer.prototype = ...@@ -1184,7 +1184,7 @@ CChartsDrawer.prototype =
} }
} }
} }
else if(isHBar === 'Scatter' && catAx.xPoints && valAx.yPoints) else if(isHBar === 'Scatter' && catAx && valAx && catAx.xPoints && valAx.yPoints)
{ {
leftDownPointX = catAx.xPoints[0].pos; leftDownPointX = catAx.xPoints[0].pos;
leftDownPointY = valAx.yPoints[0].pos; leftDownPointY = valAx.yPoints[0].pos;
...@@ -1219,7 +1219,7 @@ CChartsDrawer.prototype = ...@@ -1219,7 +1219,7 @@ CChartsDrawer.prototype =
} }
} }
} }
else if(isHBar !== undefined && catAx.xPoints && valAx.yPoints) else if(isHBar !== undefined && valAx && catAx && catAx.xPoints && valAx.yPoints)
{ {
if(catAx.xPoints.length > 1) if(catAx.xPoints.length > 1)
{ {
...@@ -1276,7 +1276,7 @@ CChartsDrawer.prototype = ...@@ -1276,7 +1276,7 @@ CChartsDrawer.prototype =
top = rightUpPointY - catAx.labels.y; top = rightUpPointY - catAx.labels.y;
} }
} }
} }
return {left: left, right: right, top: top, bottom: bottom}; return {left: left, right: right, top: top, bottom: bottom};
......
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