Commit 6ebae178 authored by GoshaZotov's avatar GoshaZotov

change size perspective pie chart

parent ba8bb483
......@@ -154,8 +154,8 @@ Processor3D.prototype._calculateAutoHPercent = function()
if(AscFormat.c_oChartTypes.Pie === this.chartsDrawer.calcProp.type)
{
this.hPercent = this.hPercent / 6.8;
this.view3D.depthPercent = 680;
this.hPercent = 0.12;
//this.view3D.depthPercent = 180;
}
}
......@@ -1000,6 +1000,12 @@ Processor3D.prototype._calculateDepthPerspective = function()
var gapWidth = this.chartSpace.chart.plotArea.chart.gapWidth != null ? (this.chartSpace.chart.plotArea.chart.gapWidth / 100) : (150 / 100);
var gapDepth = this.chartSpace.chart.plotArea.chart.gapDepth != null ? (this.chartSpace.chart.plotArea.chart.gapDepth / 100) : (150 / 100);
if(AscFormat.c_oChartTypes.Area === this.chartsDrawer.calcProp.type)
{
gapWidth = 0;
gapDepth = 0;
}
var baseDepth = width / (seriesCount - (seriesCount - 1) * overlap + gapWidth);
if(this.chartsDrawer.calcProp.subType == "standard" || this.chartsDrawer.calcProp.type == AscFormat.c_oChartTypes.Line || isNormalArea)
baseDepth = (width / (seriesCount - (seriesCount - 1) * overlap + gapWidth)) * seriesCount;
......@@ -1080,14 +1086,30 @@ Processor3D.prototype._calculateCameraDiff = function (/*isSkip*/)
//add test points for parallelepiped rect
var points = [];
var faces = [];
points.push(new Point3D(this.left, this.top, perspectiveDepth, this));
points.push(new Point3D(this.left, heightChart + this.top, perspectiveDepth, this));
points.push(new Point3D(originalWidthChart + this.left, heightChart + this.top, perspectiveDepth, this));
points.push(new Point3D(originalWidthChart + this.left, this.top, perspectiveDepth, this));
points.push(new Point3D(originalWidthChart + this.left, this.top, 0, this));
points.push(new Point3D(originalWidthChart + this.left, heightChart + this.top, 0, this));
points.push(new Point3D(this.left, heightChart + this.top, 0, this));
points.push(new Point3D(this.left, this.top, 0, this));
if(AscFormat.c_oChartTypes.Pie === this.chartsDrawer.calcProp.type)
{
points.push(new Point3D(this.left + originalWidthChart / 2, this.top, perspectiveDepth, this));
points.push(new Point3D(this.left, this.top, perspectiveDepth / 2, this));
points.push(new Point3D(this.left + originalWidthChart, this.top, perspectiveDepth / 2, this));
points.push(new Point3D(this.left + originalWidthChart / 2, this.top, 0, this));
points.push(new Point3D(this.left + originalWidthChart / 2, this.top + heightChart, perspectiveDepth, this));
points.push(new Point3D(this.left, this.top + heightChart, perspectiveDepth / 2, this));
points.push(new Point3D(this.left + originalWidthChart, this.top + heightChart, perspectiveDepth / 2, this));
points.push(new Point3D(this.left + originalWidthChart / 2, this.top + heightChart, 0, this));
}
else
{
points.push(new Point3D(this.left, this.top, perspectiveDepth, this));
points.push(new Point3D(this.left, heightChart + this.top, perspectiveDepth, this));
points.push(new Point3D(originalWidthChart + this.left, heightChart + this.top, perspectiveDepth, this));
points.push(new Point3D(originalWidthChart + this.left, this.top, perspectiveDepth, this));
points.push(new Point3D(originalWidthChart + this.left, this.top, 0, this));
points.push(new Point3D(originalWidthChart + this.left, heightChart + this.top, 0, this));
points.push(new Point3D(this.left, heightChart + this.top, 0, this));
points.push(new Point3D(this.left, this.top, 0, this));
}
faces.push([0,1,2,3]);
faces.push([2,5,4,3]);
......@@ -1342,6 +1364,7 @@ Processor3D.prototype.checkOutSideArea = function(newPoints)
}
};
calculateZ(100);
calculateZ(10);
calculateZ(1);
......
......@@ -2532,7 +2532,16 @@ CChartsDrawer.prototype =
if(numCache != null && numCache.pts && numCache.pts.length)
{
if(!this.calcProp.ptCount)
this.calcProp.ptCount = numCache.ptCount;
{
if(AscFormat.c_oChartTypes.Pie === this.calcProp.type)
{
this.calcProp.ptCount = 1;
}
else
{
this.calcProp.ptCount = numCache.ptCount;
}
}
//TODO возможно нужно будет проверку добавить на isHidden
counter++;
......@@ -2543,6 +2552,11 @@ CChartsDrawer.prototype =
}
}
if(AscFormat.c_oChartTypes.Pie === this.calcProp.type)
{
counter = 1;
}
return counter;
},
......@@ -7439,6 +7453,7 @@ drawPieChart.prototype =
{
if(this.cChartDrawer.processor3D.view3D.rAngAx)
{
this.properties3d = this.cChartDrawer.processor3D.calculatePropertiesForPieCharts();
this._reсalculatePie3D();
}
else
......
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