Commit d64c6dc9 authored by GoshaZotov's avatar GoshaZotov

corrections for rAng surface charts

parent 0c04c84f
...@@ -1129,7 +1129,7 @@ Processor3D.prototype._calculateDepth = function() ...@@ -1129,7 +1129,7 @@ Processor3D.prototype._calculateDepth = function()
{ {
angleOxKf = sinOx === 0 ? 0 : sinOx; angleOxKf = sinOx === 0 ? 0 : sinOx;
if(type == AscFormat.c_oChartTypes.Area || type === AscFormat.c_oChartTypes.Surface) if(type == AscFormat.c_oChartTypes.Area)
depth = (depthPercent / (angleOxKf*depthPercent + ((ptCount + (Math.floor((seriesCount - ptCount) / 2 - 0.5))) / seriesCount * hPercent))) * (heightOriginalChart); depth = (depthPercent / (angleOxKf*depthPercent + ((ptCount + (Math.floor((seriesCount - ptCount) / 2 - 0.5))) / seriesCount * hPercent))) * (heightOriginalChart);
else else
depth = (depthPercent / (angleOxKf*depthPercent + ((ptCount + (Math.floor((seriesCount - ptCount) / 2))) / seriesCount * hPercent))) * (heightOriginalChart); depth = (depthPercent / (angleOxKf*depthPercent + ((ptCount + (Math.floor((seriesCount - ptCount) / 2))) / seriesCount * hPercent))) * (heightOriginalChart);
...@@ -1225,7 +1225,7 @@ Processor3D.prototype._calculateScaleFromDepth = function (/*isSkip*/) ...@@ -1225,7 +1225,7 @@ Processor3D.prototype._calculateScaleFromDepth = function (/*isSkip*/)
var subType = this.chartsDrawer.calcProp.subType; var subType = this.chartsDrawer.calcProp.subType;
var newDepth, newWidth; var newDepth, newWidth;
if(!(subType == "standard" || this.chartsDrawer.calcProp.type === AscFormat.c_oChartTypes.Line || (this.chartsDrawer.calcProp.type === AscFormat.c_oChartTypes.Area && subType == "normal"))) if(!(subType == "standard" || this.chartsDrawer.calcProp.type === AscFormat.c_oChartTypes.Line || this.chartsDrawer.calcProp.type === AscFormat.c_oChartTypes.Surface || (this.chartsDrawer.calcProp.type === AscFormat.c_oChartTypes.Area && subType == "normal")))
{ {
newDepth = this.depthPerspective * Math.sin(-this.angleOx); newDepth = this.depthPerspective * Math.sin(-this.angleOx);
newWidth = heightChart - newDepth; newWidth = heightChart - newDepth;
...@@ -2508,7 +2508,7 @@ Processor3D.prototype._calcAspectRatio = function() ...@@ -2508,7 +2508,7 @@ Processor3D.prototype._calcAspectRatio = function()
aspectRatioX = (widthOriginalChart / (heightOriginalChart / hPercent)) * this.specialStandardScaleX; aspectRatioX = (widthOriginalChart / (heightOriginalChart / hPercent)) * this.specialStandardScaleX;
} }
else if(subType === "standard" || this.chartsDrawer.calcProp.type === AscFormat.c_oChartTypes.Line) else if(subType === "standard" || this.chartsDrawer.calcProp.type === AscFormat.c_oChartTypes.Line || this.chartsDrawer.calcProp.type === AscFormat.c_oChartTypes.Surface)
{ {
var seriesCount = this.chartsDrawer.calcProp.seriesCount; var seriesCount = this.chartsDrawer.calcProp.seriesCount;
var ptCount = this.chartsDrawer.calcProp.ptCount; var ptCount = this.chartsDrawer.calcProp.ptCount;
......
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