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

Merged revision(s) from AVS/Sources/TeamlabOffice/branches/TeamlabOffice_v3.5_3DChart:


git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67558 954022d7-b5bf-4e40-9824-e11837661b57
parent f791b99c
This diff is collapsed.
This diff is collapsed.
......@@ -1864,6 +1864,8 @@ CPlotArea.prototype =
this.catAx = axis;
if(axis instanceof CValAx)
this.valAx = axis;
if(axis instanceof CSerAx)
this.serAx = axis;
},
addChart: function(pr, idx)
......
......@@ -2652,6 +2652,10 @@ CChartSpace.prototype =
cat_ax.yPoints = null;
val_ax.yPoints = null;
cat_ax.xPoints = null;
val_ax.transformYPoints = null;
cat_ax.transformXPoints = null;
val_ax.transformXPoints = null;
cat_ax.transformYPoints = null;
}
}
else if(chart_type === historyitem_type_BarChart && chart_object.barDir === BAR_DIR_BAR)
......@@ -2674,6 +2678,10 @@ CChartSpace.prototype =
cat_ax.yPoints = null;
val_ax.yPoints = null;
cat_ax.xPoints = null;
val_ax.transformYPoints = null;
cat_ax.transformXPoints = null;
val_ax.transformXPoints = null;
cat_ax.transformYPoints = null;
}
}
return;
......@@ -4454,6 +4462,12 @@ CChartSpace.prototype =
cat_ax.yPoints = null;
val_ax.yPoints = null;
cat_ax.xPoints = null;
val_ax.transformYPoints = null;
cat_ax.transformXPoints = null;
val_ax.transformXPoints = null;
cat_ax.transformYPoints = null;
var sizes = this.getChartSizes();
var rect = {x: sizes.startX, y:sizes.startY, w:sizes.w, h: sizes.h};
var arr_val = this.getValAxisValues();
......@@ -5360,6 +5374,82 @@ CChartSpace.prototype =
}
},
checkAxisLabelsTransform: function()
{
if(this.chart && this.chart.plotArea && this.chart.plotArea.chart && this.chart.plotArea.chart.getAxisByTypes)
{
var oAxisByTypes = this.chart.plotArea.chart.getAxisByTypes();
var oCatAx = oAxisByTypes.catAx[0], oValAx = oAxisByTypes.valAx[0], deltaX, deltaY, i, oAxisLabels, oLabel, oNewPos;
if(oCatAx && oValAx)
{
if(( (oCatAx.axPos === AX_POS_B || oCatAx.axPos === AX_POS_T) && oCatAx.transformXPoints && oCatAx.xPoints) &&
((oValAx.axPos === AX_POS_L || oValAx.axPos === AX_POS_R) && oValAx.transformYPoints && oValAx.yPoints))
{
oAxisLabels = oCatAx.labels;
if(oAxisLabels)
{
for(i = 0; i < oAxisLabels.arrLabels.length; ++i)
{
oLabel = oAxisLabels.arrLabels[i];
deltaX = oLabel.transformText.tx - oCatAx.xPoints[i].pos;
deltaY = oLabel.transformText.ty - oAxisLabels.y;
oNewPos = oCatAx.transformXPoints[i];
oLabel.setPosition(oNewPos.x + deltaX, oNewPos.y + deltaY);
}
}
oAxisLabels = oValAx.labels;
if(oAxisLabels)
{
for(i = 0; i < oAxisLabels.arrLabels.length; ++i)
{
oLabel = oAxisLabels.arrLabels[i];
deltaX = oLabel.transformText.tx - oAxisLabels.x;
deltaY = oLabel.transformText.ty - oValAx.yPoints[i].pos;
oNewPos = oValAx.transformYPoints[i];
oLabel.setPosition(oNewPos.x + deltaX, oNewPos.y + deltaY);
}
}
}
else if(((oCatAx.axPos === AX_POS_L || oCatAx.axPos === AX_POS_R) && oCatAx.transformYPoints && oCatAx.yPoints) &&
((oValAx.axPos === AX_POS_T || oValAx.axPos === AX_POS_B) && oValAx.transformXPoints && oValAx.xPoints))
{
oAxisLabels = oValAx.labels;
if(oAxisLabels)
{
for(i = 0; i < oAxisLabels.arrLabels.length; ++i)
{
oLabel = oAxisLabels.arrLabels[i];
deltaX = oLabel.transformText.tx - oValAx.xPoints[i].pos;
deltaY = oLabel.transformText.ty - oAxisLabels.y;
oNewPos = oValAx.transformXPoints[i];
oLabel.setPosition(oNewPos.x + deltaX, oNewPos.y + deltaY);
}
}
oAxisLabels = oCatAx.labels;
if(oAxisLabels)
{
for(i = 0; i < oAxisLabels.arrLabels.length; ++i)
{
oLabel = oAxisLabels.arrLabels[i];
deltaX = oLabel.transformText.tx - oAxisLabels.x;
deltaY = oLabel.transformText.ty - oCatAx.yPoints[i].pos;
oNewPos = oCatAx.transformYPoints[i];
oLabel.setPosition(oNewPos.x + deltaX, oNewPos.y + deltaY);
}
}
}
}
}
},
recalculateLegend: function()
{
......
......@@ -10294,11 +10294,11 @@ BinaryChartReader.prototype.ReadCT_PlotArea = function (type, length, val, oIdTo
});
oNewVal.set3D(true);
//3d->2d
if (BAR_GROUPING_STANDARD == oNewVal.grouping)
/*if (BAR_GROUPING_STANDARD == oNewVal.grouping)
oNewVal.setGrouping(BAR_GROUPING_CLUSTERED);
else if(BAR_GROUPING_CLUSTERED != oNewVal.grouping){
oNewVal.setOverlap(100);
}
}*/
val.addChart(oNewVal);
}
else if (c_oserct_plotareaBARCHART === type) {
......
......@@ -248,6 +248,7 @@
<script type="text/javascript" src="../../../../OfficeWeb/Common/Charts/DrawingObjects.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/Charts/charts.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/Charts/ChartsDrawer.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/Charts/3DTransformation.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/commonDefines.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/apiCommon.js"></script>
......
......@@ -372,6 +372,7 @@ CChartSpace.prototype.recalculate = function()
{
this.recalculateChart();
this.recalcInfo.recalculateChart = false;
this.checkAxisLabelsTransform();
}
......
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