Commit e6bbb412 authored by GoshaZotov's avatar GoshaZotov

delete unused vars

parent 58ab01bc
...@@ -404,7 +404,7 @@ CChartsDrawer.prototype = ...@@ -404,7 +404,7 @@ CChartsDrawer.prototype =
var convertResultY2 = this._convertAndTurnPoint(posX * this.calcProp.pxToMM, downYPoint * this.calcProp.pxToMM, 0); var convertResultY2 = this._convertAndTurnPoint(posX * this.calcProp.pxToMM, downYPoint * this.calcProp.pxToMM, 0);
var heightPerspectiveChart = convertResultY1.y - convertResultY2.y; var heightPerspectiveChart = convertResultY1.y - convertResultY2.y;
var y = (convertResultY2.y + heightPerspectiveChart / 2) / this.calcProp.pxToMM - heightTitle / 2; y = (convertResultY2.y + heightPerspectiveChart / 2) / this.calcProp.pxToMM - heightTitle / 2;
} }
else else
{ {
...@@ -532,7 +532,7 @@ CChartsDrawer.prototype = ...@@ -532,7 +532,7 @@ CChartsDrawer.prototype =
var pxToMM = this.calcProp.pxToMM; var pxToMM = this.calcProp.pxToMM;
var isHBar = (chartSpace.chart.plotArea.chart.getObjectType() == AscDFH.historyitem_type_BarChart && chartSpace.chart.plotArea.chart.barDir === AscFormat.BAR_DIR_BAR) ? true : false; var isHBar = !!(chartSpace.chart.plotArea.chart.getObjectType() == AscDFH.historyitem_type_BarChart && chartSpace.chart.plotArea.chart.barDir === AscFormat.BAR_DIR_BAR);
//если точки рассчитаны - ставим маргин в зависимости от них //если точки рассчитаны - ставим маргин в зависимости от них
var marginOnPoints = this._calculateMarginOnPoints(chartSpace, isHBar); var marginOnPoints = this._calculateMarginOnPoints(chartSpace, isHBar);
...@@ -597,7 +597,7 @@ CChartsDrawer.prototype = ...@@ -597,7 +597,7 @@ CChartsDrawer.prototype =
} }
case c_oAscChartLegendShowSettings.top: case c_oAscChartLegendShowSettings.top:
{ {
topKey += fLegendExtY topKey += fLegendExtY;
break; break;
} }
case c_oAscChartLegendShowSettings.right: case c_oAscChartLegendShowSettings.right:
...@@ -2220,7 +2220,7 @@ CChartsDrawer.prototype = ...@@ -2220,7 +2220,7 @@ CChartsDrawer.prototype =
return result; return result;
}, },
getLogarithmicValue: function(val, logBase, yPoints) getLogarithmicValue: function(val, logBase)
{ {
if(val < 0) if(val < 0)
return 0; return 0;
...@@ -2244,7 +2244,6 @@ CChartsDrawer.prototype = ...@@ -2244,7 +2244,6 @@ CChartsDrawer.prototype =
else else
{ {
var parseTemp = logVal.toString().split("."); var parseTemp = logVal.toString().split(".");
var nextTemp = Math.pow(logBase, parseFloat(parseTemp[0]) - 1);
temp = Math.pow(logBase, parseFloat(parseTemp[0])); temp = Math.pow(logBase, parseFloat(parseTemp[0]));
temp = temp - temp * parseFloat("0." + parseTemp[1]); temp = temp - temp * parseFloat("0." + parseTemp[1]);
...@@ -2286,7 +2285,7 @@ CChartsDrawer.prototype = ...@@ -2286,7 +2285,7 @@ CChartsDrawer.prototype =
var angleOy = chartSpace.chart.view3D && chartSpace.chart.view3D.rotY ? (- chartSpace.chart.view3D.rotY / 360) * (Math.PI * 2) : 0; var angleOy = chartSpace.chart.view3D && chartSpace.chart.view3D.rotY ? (- chartSpace.chart.view3D.rotY / 360) * (Math.PI * 2) : 0;
if(chartSpace.chart.view3D && !chartSpace.chart.view3D.rAngAx && angleOy !== 0) if(chartSpace.chart.view3D && !chartSpace.chart.view3D.rAngAx && angleOy !== 0)
{ {
var angleOy = Math.abs(angleOy); angleOy = Math.abs(angleOy);
if(angleOy >= Math.PI / 2 && angleOy < 3 * Math.PI / 2) if(angleOy >= Math.PI / 2 && angleOy < 3 * Math.PI / 2)
res = true; res = true;
...@@ -2361,7 +2360,7 @@ CChartsDrawer.prototype = ...@@ -2361,7 +2360,7 @@ CChartsDrawer.prototype =
_getFirstDegree: function(val) _getFirstDegree: function(val)
{ {
var secPart = val.toString().split('.'); var secPart = val.toString().split('.');
var numPow = 1,tempMax; var numPow = 1, tempMax;
if(secPart[1] && secPart[1].toString().indexOf('e+') != -1 && secPart[0] && secPart[0].toString().length == 1) if(secPart[1] && secPart[1].toString().indexOf('e+') != -1 && secPart[0] && secPart[0].toString().length == 1)
{ {
...@@ -2374,10 +2373,10 @@ CChartsDrawer.prototype = ...@@ -2374,10 +2373,10 @@ CChartsDrawer.prototype =
numPow = Math.pow(10, expNum[1]); numPow = Math.pow(10, expNum[1]);
} }
else if(0 != secPart[0]) else if(0 != secPart[0])
numPow = Math.pow(10, secPart[0].toString().length - 1) numPow = Math.pow(10, secPart[0].toString().length - 1);
else if(0 == secPart[0] && secPart[1] != undefined) else if(0 == secPart[0] && secPart[1] != undefined)
{ {
var tempMax = val; tempMax = val;
var num = 0; var num = 0;
while(1 > tempMax) while(1 > tempMax)
{ {
...@@ -2579,13 +2578,13 @@ CChartsDrawer.prototype = ...@@ -2579,13 +2578,13 @@ CChartsDrawer.prototype =
var n = z1 - z0; var n = z1 - z0;
//check line //check line
var x123 = (point1.x - x0) / (x1 - x0); /*var x123 = (point1.x - x0) / (x1 - x0);
var y123 = (point1.y - y0) / (y1 - y0); var y123 = (point1.y - y0) / (y1 - y0);
var z123 = (point1.z - z0) / (z1 - z0); var z123 = (point1.z - z0) / (z1 - z0);
var x321 = (point2.x - x0) / (x1 - x0); var x321 = (point2.x - x0) / (x1 - x0);
var y321 = (point2.y - y0) / (y1 - y0); var y321 = (point2.y - y0) / (y1 - y0);
var z321 = (point2.z - z0) / (z1 - z0); var z321 = (point2.z - z0) / (z1 - z0);*/
return {l: l, m: m, n: n, x1: x0, y1: y0, z1: z0}; return {l: l, m: m, n: n, x1: x0, y1: y0, z1: z0};
}, },
...@@ -3045,17 +3044,17 @@ CChartsDrawer.prototype = ...@@ -3045,17 +3044,17 @@ CChartsDrawer.prototype =
var result; var result;
if(this.calcProp.type == c_oChartTypes.Bar) if(this.calcProp.type == c_oChartTypes.Bar)
{ {
result = (val > 0 && visible < 0 || val < 0 && visible > 0) ? true : false; result = !!(val > 0 && visible < 0 || val < 0 && visible > 0);
if(!(this.calcProp.subType == "stacked") && !(this.calcProp.subType == "stackedPer") && this.cChartSpace.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX) if(!(this.calcProp.subType == "stacked") && !(this.calcProp.subType == "stackedPer") && this.cChartSpace.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX)
result = !result; result = !result;
} }
else if(this.calcProp.type == c_oChartTypes.Line) else if(this.calcProp.type == c_oChartTypes.Line)
{ {
result = visible < 0 ? true : false result = visible < 0;
} }
else if(this.calcProp.type == c_oChartTypes.HBar) else if(this.calcProp.type == c_oChartTypes.HBar)
{ {
result = (val < 0 && visible < 0 || val > 0 && visible > 0) ? true : false; result = !!(val < 0 && visible < 0 || val > 0 && visible > 0);
if(!(this.calcProp.subType == "stacked") && !(this.calcProp.subType == "stackedPer") && this.cChartSpace.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX) if(!(this.calcProp.subType == "stacked") && !(this.calcProp.subType == "stackedPer") && this.cChartSpace.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX)
result = !result; result = !result;
...@@ -3107,7 +3106,6 @@ CChartsDrawer.prototype = ...@@ -3107,7 +3106,6 @@ CChartsDrawer.prototype =
{ {
var res = false; var res = false;
var excelApi = window["Asc"] && window["Asc"]["editor"];
var chart = chartSpace && chartSpace.chart ? chartSpace.chart.plotArea.charts[0]: null; var chart = chartSpace && chartSpace.chart ? chartSpace.chart.plotArea.charts[0]: null;
var typeChart = chart ? chart.getObjectType() : null; var typeChart = chart ? chart.getObjectType() : null;
...@@ -3237,7 +3235,7 @@ drawBarChart.prototype = ...@@ -3237,7 +3235,7 @@ drawBarChart.prototype =
var nullPositionOX = this.cChartSpace.chart.plotArea.valAx && this.cChartSpace.chart.plotArea.valAx.scaling.logBase ? this.chartProp.nullPositionOXLog : this.cChartSpace.chart.plotArea.catAx.posY * this.chartProp.pxToMM; var nullPositionOX = this.cChartSpace.chart.plotArea.valAx && this.cChartSpace.chart.plotArea.valAx.scaling.logBase ? this.chartProp.nullPositionOXLog : this.cChartSpace.chart.plotArea.catAx.posY * this.chartProp.pxToMM;
var height, startX, startY, diffYVal, val, paths, seriesHeight = [], tempValues = [], seria, startYColumnPosition, startXPosition, prevVal, idx, seriesCounter = 0; var height, startX, startY, val, paths, seriesHeight = [], tempValues = [], seria, startYColumnPosition, startXPosition, prevVal, idx, seriesCounter = 0;
var cubeCount = 0; var cubeCount = 0;
for (var i = 0; i < this.chartProp.series.length; i++) { for (var i = 0; i < this.chartProp.series.length; i++) {
numCache = this.chartProp.series[i].val.numRef ? this.chartProp.series[i].val.numRef.numCache : this.chartProp.series[i].val.numLit; numCache = this.chartProp.series[i].val.numRef ? this.chartProp.series[i].val.numRef.numCache : this.chartProp.series[i].val.numLit;
...@@ -3794,7 +3792,6 @@ drawBarChart.prototype = ...@@ -3794,7 +3792,6 @@ drawBarChart.prototype =
_DrawBars3D: function() _DrawBars3D: function()
{ {
var t = this; var t = this;
var processor3D = this.cChartDrawer.processor3D;
var drawVerges = function(i, j, paths, onlyLessNull, k, isNotPen, isNotBrush) var drawVerges = function(i, j, paths, onlyLessNull, k, isNotPen, isNotBrush)
{ {
...@@ -4480,7 +4477,7 @@ drawLineChart.prototype = ...@@ -4480,7 +4477,7 @@ drawLineChart.prototype =
{ {
var t = this; var t = this;
var drawVerges = function(j, i, onlyLessNull) var drawVerges = function(j, i)
{ {
var brush, pen, seria; var brush, pen, seria;
...@@ -4579,7 +4576,7 @@ drawLineChart.prototype = ...@@ -4579,7 +4576,7 @@ drawLineChart.prototype =
cColorMod.val = 35000; cColorMod.val = 35000;
} }
this._addColorMods(cColorMod, duplicateBrush) this._addColorMods(cColorMod, duplicateBrush);
duplicateBrush.calculate(props.theme, props.slide, props.layout, props.master, new AscFormat.CUniColor().RGBA); duplicateBrush.calculate(props.theme, props.slide, props.layout, props.master, new AscFormat.CUniColor().RGBA);
pen = AscFormat.CreatePenFromParams(duplicateBrush, undefined, undefined, undefined, undefined, 0.1); pen = AscFormat.CreatePenFromParams(duplicateBrush, undefined, undefined, undefined, undefined, 0.1);
...@@ -4753,7 +4750,7 @@ drawAreaChart.prototype = ...@@ -4753,7 +4750,7 @@ drawAreaChart.prototype =
{ {
this._calculatePaths3D(); this._calculatePaths3D();
var cSortFaces = new CSortFaces(this.cChartDrawer); //var cSortFaces = new CSortFaces(this.cChartDrawer);
//this.upFaces = cSortFaces.sortFaces(this.upFaces); //this.upFaces = cSortFaces.sortFaces(this.upFaces);
var upDownFaces = this.upFaces.concat(this.downFaces); var upDownFaces = this.upFaces.concat(this.downFaces);
...@@ -4782,7 +4779,7 @@ drawAreaChart.prototype = ...@@ -4782,7 +4779,7 @@ drawAreaChart.prototype =
} }
var anotherFaces = this.sortZIndexPathsFront.concat(this.sortZIndexPathsBack).concat(this.sortZIndexPathsLeft).concat(this.sortZIndexPathsRight); var anotherFaces = this.sortZIndexPathsFront.concat(this.sortZIndexPathsBack).concat(this.sortZIndexPathsLeft).concat(this.sortZIndexPathsRight);
this.sortZIndexPaths = upDownFaces.concat(anotherFaces) this.sortZIndexPaths = upDownFaces.concat(anotherFaces);
//медленная, но более качественный сортировка //медленная, но более качественный сортировка
//var anotherFaces = this.sortZIndexPathsFront.concat(this.sortZIndexPathsBack).concat(this.sortZIndexPathsLeft).concat(this.sortZIndexPathsRight); //var anotherFaces = this.sortZIndexPathsFront.concat(this.sortZIndexPathsBack).concat(this.sortZIndexPathsLeft).concat(this.sortZIndexPathsRight);
...@@ -4900,7 +4897,7 @@ drawAreaChart.prototype = ...@@ -4900,7 +4897,7 @@ drawAreaChart.prototype =
return path; return path;
}, },
_calculateLine3D: function (points, seriaNum, allPoints) _calculateLine3D: function (points, seriaNum)
{ {
//pointsIn3D[0] - верхняя кривая ближней стороны, pointsIn3D[1] - нижняя кривая ближней стороны, pointsIn3D[2] - верхняя кривая дальней стороны, pointsIn3D[3] - нижняя кривая дальней стороны //pointsIn3D[0] - верхняя кривая ближней стороны, pointsIn3D[1] - нижняя кривая ближней стороны, pointsIn3D[2] - верхняя кривая дальней стороны, pointsIn3D[3] - нижняя кривая дальней стороны
var pointsIn3D = [], t = this, pxToMm = this.chartProp.pxToMM; var pointsIn3D = [], t = this, pxToMm = this.chartProp.pxToMM;
...@@ -5236,7 +5233,7 @@ drawAreaChart.prototype = ...@@ -5236,7 +5233,7 @@ drawAreaChart.prototype =
var point5 = pointsIn3D[upNear][0]; var point5 = pointsIn3D[upNear][0];
var point6 = pointsIn3D[upFar][0]; var point6 = pointsIn3D[upFar][0];
var point7 = pointsIn3D[upFar][pointsIn3D[upFar].length - 1]; var point7 = pointsIn3D[upFar][pointsIn3D[upFar].length - 1];
var point8 = pointsIn3D[upNear][pointsIn3D[upNear].length - 1] var point8 = pointsIn3D[upNear][pointsIn3D[upNear].length - 1];
//front //front
...@@ -5308,7 +5305,7 @@ drawAreaChart.prototype = ...@@ -5308,7 +5305,7 @@ drawAreaChart.prototype =
_calculateRect3DStacked: function(arrPoints, arrPointsProject, arrNotRotatePoints, point, seria) _calculateRect3DStacked: function(arrPoints, arrPointsProject, arrNotRotatePoints, point, seria)
{ {
var path, pxToMm = this.chartProp.pxToMM, t = this, paths = []; var pxToMm = this.chartProp.pxToMM, t = this;
var pathH = this.chartProp.pathH; var pathH = this.chartProp.pathH;
var pathW = this.chartProp.pathW; var pathW = this.chartProp.pathW;
...@@ -5697,7 +5694,7 @@ drawAreaChart.prototype = ...@@ -5697,7 +5694,7 @@ drawAreaChart.prototype =
this.prevUp[pointIndex][seriaIndex] = curUp; this.prevUp[pointIndex][seriaIndex] = curUp;
}, },
_calculateSimpleRect: function(arrPoints, arrPointsProject, point, seria, props) _calculateSimpleRect: function(arrPoints, arrPointsProject, point, seria)
{ {
var path, pxToMm = this.chartProp.pxToMM, t = this, paths = []; var path, pxToMm = this.chartProp.pxToMM, t = this, paths = [];
var pathH = this.chartProp.pathH; var pathH = this.chartProp.pathH;
...@@ -5854,7 +5851,6 @@ drawAreaChart.prototype = ...@@ -5854,7 +5851,6 @@ drawAreaChart.prototype =
{ {
var pxToMm = this.chartProp.pxToMM; var pxToMm = this.chartProp.pxToMM;
var numCache = this.chartProp.series[ser].val.numRef ? this.chartProp.series[ser].val.numRef.numCache : this.chartProp.series[ser].val.numLit;
var point = this.cChartDrawer.getIdxPoint(this.chartProp.series[ser], val); var point = this.cChartDrawer.getIdxPoint(this.chartProp.series[ser], val);
var path; var path;
...@@ -6008,7 +6004,6 @@ drawAreaChart.prototype = ...@@ -6008,7 +6004,6 @@ drawAreaChart.prototype =
} }
else else
{ {
numCache = this.chartProp.series[i].val.numRef ? this.chartProp.series[i].val.numRef.numCache : this.chartProp.series[i].val.numLit;
idxPoint = this.cChartDrawer.getIdxPoint(this.chartProp.series[i], n); idxPoint = this.cChartDrawer.getIdxPoint(this.chartProp.series[i], n);
val = idxPoint ? parseFloat(idxPoint.val) : null; val = idxPoint ? parseFloat(idxPoint.val) : null;
} }
...@@ -6019,7 +6014,6 @@ drawAreaChart.prototype = ...@@ -6019,7 +6014,6 @@ drawAreaChart.prototype =
{ {
//ширина линии //ширина линии
var brush; var brush;
var FillUniColor;
var pen; var pen;
var seria, dataSeries; var seria, dataSeries;
...@@ -6107,7 +6101,6 @@ drawAreaChart.prototype = ...@@ -6107,7 +6101,6 @@ drawAreaChart.prototype =
_drawBars3D: function() _drawBars3D: function()
{ {
var t = this; var t = this;
var processor3D = this.cChartDrawer.processor3D;
var isStacked = !!(this.chartProp.subType == "stackedPer" || this.chartProp.subType == "stacked"); var isStacked = !!(this.chartProp.subType == "stackedPer" || this.chartProp.subType == "stacked");
if(!isStacked) if(!isStacked)
...@@ -6212,14 +6205,12 @@ drawAreaChart.prototype = ...@@ -6212,14 +6205,12 @@ drawAreaChart.prototype =
var cZ = k.x * n.y - n.x * k.y; var cZ = k.x * n.y - n.x * k.y;
var visible = aX + bY + cZ; var visible = aX + bY + cZ;
return visible < 0 ? true : false return visible < 0;
}, },
_getIntersectionLines: function(line1Point1, line1Point2, line2Point1, line2Point2) _getIntersectionLines: function(line1Point1, line1Point2, line2Point1, line2Point2)
{ {
var chartHeight = this.chartProp.trueHeight; var chartHeight = this.chartProp.trueHeight;
var chartWidth = this.chartProp.trueWidth;
var left = this.chartProp.chartGutter._left;
var top = this.chartProp.chartGutter._top; var top = this.chartProp.chartGutter._top;
var x1 = line1Point1.x; var x1 = line1Point1.x;
...@@ -6240,7 +6231,7 @@ drawAreaChart.prototype = ...@@ -6240,7 +6231,7 @@ drawAreaChart.prototype =
var res = null; var res = null;
if(y < top + chartHeight && y > top && x > line1Point1.x && x < line1Point2.x) if(y < top + chartHeight && y > top && x > line1Point1.x && x < line1Point2.x)
res = {x: x, y: y} res = {x: x, y: y};
return res; return res;
} }
...@@ -6296,7 +6287,6 @@ drawHBarChart.prototype = ...@@ -6296,7 +6287,6 @@ drawHBarChart.prototype =
var xPoints = this.cChartSpace.chart.plotArea.valAx.xPoints; var xPoints = this.cChartSpace.chart.plotArea.valAx.xPoints;
var yPoints = this.cChartSpace.chart.plotArea.catAx.yPoints; var yPoints = this.cChartSpace.chart.plotArea.catAx.yPoints;
var xaxispos = this.chartProp.xaxispos;
var heightGraph = this.chartProp.heightCanvas - this.chartProp.chartGutter._top - this.chartProp.chartGutter._bottom; var heightGraph = this.chartProp.heightCanvas - this.chartProp.chartGutter._top - this.chartProp.chartGutter._bottom;
var defaultOverlap = (this.chartProp.subType == "stacked" || this.chartProp.subType == "stackedPer") ? 100 : 0; var defaultOverlap = (this.chartProp.subType == "stacked" || this.chartProp.subType == "stackedPer") ? 100 : 0;
...@@ -6315,7 +6305,7 @@ drawHBarChart.prototype = ...@@ -6315,7 +6305,7 @@ drawHBarChart.prototype =
var widthOverLap = individualBarHeight * (overlap / 100); var widthOverLap = individualBarHeight * (overlap / 100);
var hmargin = (gapWidth / 100 * individualBarHeight) / 2; var hmargin = (gapWidth / 100 * individualBarHeight) / 2;
var width, startX, startY, diffYVal, val, paths, seriesHeight = [], seria, startXColumnPosition, startYPosition, newStartX, newStartY, idx, seriesCounter = 0, numCache; var width, startX, startY, val, paths, seriesHeight = [], seria, startXColumnPosition, startYPosition, newStartX, newStartY, idx, seriesCounter = 0, numCache;
//for 3d //for 3d
var perspectiveDepth, gapDepth, DiffGapDepth; var perspectiveDepth, gapDepth, DiffGapDepth;
...@@ -6508,9 +6498,9 @@ drawHBarChart.prototype = ...@@ -6508,9 +6498,9 @@ drawHBarChart.prototype =
return {pen: pen, brush: brush} return {pen: pen, brush: brush}
}, },
_getStartYColumnPosition: function (seriesHeight, j, i, val, xPoints, summBarVal) _getStartYColumnPosition: function (seriesHeight, j, i, val, xPoints)
{ {
var startY, diffYVal, width, numCache, dVal, curVal, prevVal, endBlockPosition, startBlockPosition; var startY, width, curVal, prevVal, endBlockPosition, startBlockPosition;
var catAx = this.cChartSpace.chart.plotArea.catAx; var catAx = this.cChartSpace.chart.plotArea.catAx;
var nullPositionOX = catAx.posX !== null ? catAx.posX * this.chartProp.pxToMM : 0; var nullPositionOX = catAx.posX !== null ? catAx.posX * this.chartProp.pxToMM : 0;
...@@ -6985,7 +6975,6 @@ drawHBarChart.prototype = ...@@ -6985,7 +6975,6 @@ drawHBarChart.prototype =
_DrawBars3D3: function() _DrawBars3D3: function()
{ {
var t = this; var t = this;
var processor3D = this.cChartDrawer.processor3D;
var verges = var verges =
{ {
...@@ -9476,8 +9465,6 @@ drawRadarChart.prototype = ...@@ -9476,8 +9465,6 @@ drawRadarChart.prototype =
_calculateLines: function () _calculateLines: function ()
{ {
//соответствует подписям оси категорий(OX)
var xPoints = this.cChartSpace.chart.plotArea.catAx.xPoints;
//соответствует подписям оси значений(OY) //соответствует подписям оси значений(OY)
var yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints; var yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints;
...@@ -9487,7 +9474,7 @@ drawRadarChart.prototype = ...@@ -9487,7 +9474,7 @@ drawRadarChart.prototype =
var xCenter = (this.chartProp.chartGutter._left + trueWidth/2) / this.chartProp.pxToMM; var xCenter = (this.chartProp.chartGutter._left + trueWidth/2) / this.chartProp.pxToMM;
var yCenter = (this.chartProp.chartGutter._top + trueHeight/2) / this.chartProp.pxToMM; var yCenter = (this.chartProp.chartGutter._top + trueHeight/2) / this.chartProp.pxToMM;
var y, y1, x, x1, val, nextVal, tempVal, seria, dataSeries; var y, y1, x, x1, val, nextVal, seria, dataSeries;
var numCache = this.chartProp.series[0].val.numRef ? this.chartProp.series[0].val.numRef.numCache.pts : this.chartProp.series[0].val.numLit.pts; var numCache = this.chartProp.series[0].val.numRef ? this.chartProp.series[0].val.numRef.numCache.pts : this.chartProp.series[0].val.numLit.pts;
var tempAngle = 2 * Math.PI / numCache.length; var tempAngle = 2 * Math.PI / numCache.length;
var xDiff = ((trueHeight / 2) / yPoints.length) / this.chartProp.pxToMM; var xDiff = ((trueHeight / 2) / yPoints.length) / this.chartProp.pxToMM;
...@@ -9700,7 +9687,7 @@ drawRadarChart.prototype = ...@@ -9700,7 +9687,7 @@ drawRadarChart.prototype =
return {x: centerX, y: centerY}; return {x: centerX, y: centerY};
}, },
_drawLines: function (isRedraw/*isSkip*/) _drawLines: function ()
{ {
var brush, pen, dataSeries, seria, markerBrush, markerPen, numCache; var brush, pen, dataSeries, seria, markerBrush, markerPen, numCache;
...@@ -9844,7 +9831,7 @@ drawScatterChart.prototype = ...@@ -9844,7 +9831,7 @@ drawScatterChart.prototype =
var points; var points;
var y, y1, y2, y3, x, x1, x2, x3, val, nextVal, tempVal, seria, dataSeries, compiledMarkerSize, compiledMarkerSymbol, idx, numCache; var y, y1, y2, y3, x, val, seria, dataSeries, compiledMarkerSize, compiledMarkerSymbol, idx, numCache;
for (var i = 0; i < this.chartProp.series.length; i++) { for (var i = 0; i < this.chartProp.series.length; i++) {
seria = this.chartProp.series[i]; seria = this.chartProp.series[i];
...@@ -9910,12 +9897,7 @@ drawScatterChart.prototype = ...@@ -9910,12 +9897,7 @@ drawScatterChart.prototype =
var digHeightOy = Math.abs(maxOy - minOy); var digHeightOy = Math.abs(maxOy - minOy);
var digHeightOx = Math.abs(maxOx - minOx); var digHeightOx = Math.abs(maxOx - minOx);
var koffX = trueWidth/digHeightOx; var seria, yVal, xVal, points, yNumCache, xNumCache, compiledMarkerSize, compiledMarkerSymbol, idxPoint;
var koffY = trueHeight/digHeightOy;
var nullPositionOX = this.chartProp.nullPositionOX / this.chartProp.pxToMM;
var seria, yVal, xVal, points, x, x1, y, y1, yNumCache, xNumCache, compiledMarkerSize, compiledMarkerSymbol, idxPoint;
for(var i = 0; i < this.chartProp.series.length; i++) for(var i = 0; i < this.chartProp.series.length; i++)
{ {
seria = this.chartProp.series[i]; seria = this.chartProp.series[i];
...@@ -9973,7 +9955,6 @@ drawScatterChart.prototype = ...@@ -9973,7 +9955,6 @@ drawScatterChart.prototype =
_calculateAllLines: function(points) _calculateAllLines: function(points)
{ {
var startPoint, endPoint;
//соответствует подписям оси категорий(OX) //соответствует подписям оси категорий(OX)
var xPoints = this.cChartSpace.chart.plotArea.catAx.xPoints; var xPoints = this.cChartSpace.chart.plotArea.catAx.xPoints;
//соответствует подписям оси значений(OY) //соответствует подписям оси значений(OY)
...@@ -10029,7 +10010,7 @@ drawScatterChart.prototype = ...@@ -10029,7 +10010,7 @@ drawScatterChart.prototype =
return val; return val;
}, },
_drawScatter: function (isRedraw/*isSkip*/) _drawScatter: function ()
{ {
var brush, pen, dataSeries, seria, markerBrush, markerPen, numCache; var brush, pen, dataSeries, seria, markerBrush, markerPen, numCache;
...@@ -10421,12 +10402,10 @@ drawStockChart.prototype = ...@@ -10421,12 +10402,10 @@ drawStockChart.prototype =
}, },
_drawLines: function (isRedraw/*isSkip*/) _drawLines: function ()
{ {
var brush; var brush;
var pen; var pen;
var dataSeries;
var seria;
var numCache = this.chartProp.series[0].val.numRef ? this.chartProp.series[0].val.numRef.numCache : this.chartProp.series[0].val.numLit; var numCache = this.chartProp.series[0].val.numRef ? this.chartProp.series[0].val.numRef.numCache : this.chartProp.series[0].val.numLit;
for (var i = 0; i < numCache.pts.length; i++) { for (var i = 0; i < numCache.pts.length; i++) {
...@@ -10620,10 +10599,7 @@ drawBubbleChart.prototype = ...@@ -10620,10 +10599,7 @@ drawBubbleChart.prototype =
var digHeightOy = Math.abs(maxOy - minOy); var digHeightOy = Math.abs(maxOy - minOy);
var digHeightOx = Math.abs(maxOx - minOx); var digHeightOx = Math.abs(maxOx - minOx);
var koffX = trueWidth/digHeightOx; var seria, yVal, xVal, points, x, y, yNumCache, xNumCache;
var koffY = trueHeight/digHeightOy;
var seria, yVal, xVal, points, x, x1, y, y1, yNumCache, xNumCache;
for(var i = 0; i < this.chartProp.series.length; i++) for(var i = 0; i < this.chartProp.series.length; i++)
{ {
seria = this.chartProp.series[i]; seria = this.chartProp.series[i];
...@@ -10929,7 +10905,7 @@ gridChart.prototype = ...@@ -10929,7 +10905,7 @@ gridChart.prototype =
//соответствует подписям оси категорий(OX) //соответствует подписям оси категорий(OX)
if(this.cChartSpace.chart.plotArea.valAx) if(this.cChartSpace.chart.plotArea.valAx)
var yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints; yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints;
var numCache = this.chartProp.series[0].val.numRef ? this.chartProp.series[0].val.numRef.numCache.pts : this.chartProp.series[0].val.numLit.pts; var numCache = this.chartProp.series[0].val.numRef ? this.chartProp.series[0].val.numRef.numCache.pts : this.chartProp.series[0].val.numLit.pts;
var tempAngle = 2 * Math.PI / numCache.length; var tempAngle = 2 * Math.PI / numCache.length;
...@@ -10963,7 +10939,6 @@ gridChart.prototype = ...@@ -10963,7 +10939,6 @@ gridChart.prototype =
gdLst["h"] = 1; gdLst["h"] = 1;
path.stroke = true; path.stroke = true;
var pxToMm = this.chartProp.pxToMM;
if(k == 0) if(k == 0)
{ {
xFirst = x; xFirst = x;
...@@ -11099,7 +11074,7 @@ gridChart.prototype = ...@@ -11099,7 +11074,7 @@ gridChart.prototype =
} }
}, },
_calculateLine: function(x, y, x1, y1, i) _calculateLine: function(x, y, x1, y1)
{ {
var path; var path;
if(this.cChartDrawer.nDimensionCount === 3) if(this.cChartDrawer.nDimensionCount === 3)
...@@ -11111,7 +11086,7 @@ gridChart.prototype = ...@@ -11111,7 +11086,7 @@ gridChart.prototype =
var angleOz = 0; var angleOz = 0;
var rAngAx = this.cChartDrawer.processor3D.view3D.rAngAx; var rAngAx = this.cChartDrawer.processor3D.view3D.rAngAx;
var isVertLine = x === x1 ? true : false; var isVertLine = x === x1;
var convertResult = this.cChartDrawer._convertAndTurnPoint(x, y, 0); var convertResult = this.cChartDrawer._convertAndTurnPoint(x, y, 0);
var x1n = convertResult.x; var x1n = convertResult.x;
...@@ -11296,7 +11271,6 @@ gridChart.prototype = ...@@ -11296,7 +11271,6 @@ gridChart.prototype =
{ {
var pen; var pen;
var path; var path;
var yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints ? this.cChartSpace.chart.plotArea.valAx.yPoints : this.cChartSpace.chart.plotArea.catAx.yPoints;
for(var i = 0; i < this.paths.horisontalLines.length; i++) for(var i = 0; i < this.paths.horisontalLines.length; i++)
{ {
...@@ -11327,7 +11301,6 @@ gridChart.prototype = ...@@ -11327,7 +11301,6 @@ gridChart.prototype =
_drawVerticalLines: function() _drawVerticalLines: function()
{ {
var pen, path; var pen, path;
var xPoints = this.cChartSpace.chart.plotArea.valAx.xPoints ? this.cChartSpace.chart.plotArea.valAx.xPoints : this.cChartSpace.chart.plotArea.catAx.xPoints;
for(var i = 0; i < this.paths.verticalLines.length; i++) for(var i = 0; i < this.paths.verticalLines.length; i++)
{ {
...@@ -11397,7 +11370,6 @@ catAxisChart.prototype = ...@@ -11397,7 +11370,6 @@ catAxisChart.prototype =
_calculateAxis : function() _calculateAxis : function()
{ {
var nullPoisition = this.chartProp.nullPositionOX;
var axisPos; var axisPos;
if(this.chartProp.type == c_oChartTypes.HBar) if(this.chartProp.type == c_oChartTypes.HBar)
{ {
...@@ -11638,10 +11610,6 @@ catAxisChart.prototype = ...@@ -11638,10 +11610,6 @@ catAxisChart.prototype =
if(this.cChartDrawer.nDimensionCount === 3) if(this.cChartDrawer.nDimensionCount === 3)
{ {
var view3DProp = this.cChartSpace.chart.view3D; var view3DProp = this.cChartSpace.chart.view3D;
var angleOx = view3DProp && view3DProp.rotX ? (- view3DProp.rotX / 360) * (Math.PI * 2) : 0;
var angleOy = view3DProp && view3DProp.rotY ? (- view3DProp.rotY / 360) * (Math.PI * 2) : 0;
var perspectiveDepth = this.cChartDrawer.processor3D.depthPerspective;
var angleOz = 0;
var z = this.cChartDrawer.processor3D.calculateZPositionCatAxis(); var z = this.cChartDrawer.processor3D.calculateZPositionCatAxis();
...@@ -11664,7 +11632,6 @@ catAxisChart.prototype = ...@@ -11664,7 +11632,6 @@ catAxisChart.prototype =
gdLst["w"] = 1; gdLst["w"] = 1;
gdLst["h"] = 1; gdLst["h"] = 1;
var pxToMm = this.chartProp.pxToMM;
path.moveTo(x * pathW, y * pathH); path.moveTo(x * pathW, y * pathH);
path.lnTo(x1 * pathW, y1 * pathH); path.lnTo(x1 * pathW, y1 * pathH);
path.recalculate(gdLst); path.recalculate(gdLst);
...@@ -12018,13 +11985,9 @@ serAxisChart.prototype = ...@@ -12018,13 +11985,9 @@ serAxisChart.prototype =
_calculateAxis : function() _calculateAxis : function()
{ {
var nullPoisition = this.cChartSpace.chart.plotArea.valAx.posX;
var nullPositionOx = this.chartProp.nullPositionOX; var nullPositionOx = this.chartProp.nullPositionOX;
var view3DProp = this.cChartSpace.chart.view3D; var view3DProp = this.cChartSpace.chart.view3D;
var angleOx = view3DProp && view3DProp.rotX ? (- view3DProp.rotX / 360) * (Math.PI * 2) : 0;
var angleOy = view3DProp && view3DProp.rotY ? (- view3DProp.rotY / 360) * (Math.PI * 2) : 0;
var angleOz = 0;
var perspectiveDepth = this.cChartDrawer.processor3D.depthPerspective; var perspectiveDepth = this.cChartDrawer.processor3D.depthPerspective;
//var z = this.cChartDrawer.processor3D.calculateZPositionValAxis(); //var z = this.cChartDrawer.processor3D.calculateZPositionValAxis();
...@@ -12048,22 +12011,12 @@ serAxisChart.prototype = ...@@ -12048,22 +12011,12 @@ serAxisChart.prototype =
_calculateTickMark : function() _calculateTickMark : function()
{ {
var perspectiveDepth = this.cChartDrawer.processor3D.depthPerspective; var perspectiveDepth = this.cChartDrawer.processor3D.depthPerspective;
var tickmarksProps = this._getTickmarksProps(); var tickmarksProps = this._getTickmarksProps();
var widthLine = tickmarksProps.widthLine; var widthLine = tickmarksProps.widthLine;
var crossMajorStep = tickmarksProps.crossMajorStep;
if(widthLine !== 0) if(widthLine !== 0)
{ {
var yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints;
var stepY = perspectiveDepth / this.chartProp.seriesCount; var stepY = perspectiveDepth / this.chartProp.seriesCount;
var minorStep = stepY / this.chartProp.numhMinorlines;
var posY;
var posMinorY;
var startX = this.chartProp.widthCanvas - this.chartProp.chartGutter._right; var startX = this.chartProp.widthCanvas - this.chartProp.chartGutter._right;
var startY = this.chartProp.nullPositionOX; var startY = this.chartProp.nullPositionOX;
...@@ -12616,11 +12569,7 @@ areaChart.prototype = ...@@ -12616,11 +12569,7 @@ areaChart.prototype =
var bottomMargin = this.chartProp.chartGutter._bottom; var bottomMargin = this.chartProp.chartGutter._bottom;
var view3DProp = this.cChartSpace.chart.view3D; var view3DProp = this.cChartSpace.chart.view3D;
var angleOx = view3DProp && view3DProp.rotX ? (- view3DProp.rotX / 360) * (Math.PI * 2) : 0;
var angleOy = view3DProp && view3DProp.rotY ? (- view3DProp.rotY / 360) * (Math.PI * 2) : 0;
var perspectiveDepth = this.cChartDrawer.processor3D.depthPerspective; var perspectiveDepth = this.cChartDrawer.processor3D.depthPerspective;
var angleOz = 0;
var convertResult = this.cChartDrawer._convertAndTurnPoint(leftMargin, heightGraph - bottomMargin, perspectiveDepth); var convertResult = this.cChartDrawer._convertAndTurnPoint(leftMargin, heightGraph - bottomMargin, perspectiveDepth);
var x1n = convertResult.x; var x1n = convertResult.x;
...@@ -12793,7 +12742,6 @@ CSortFaces.prototype = ...@@ -12793,7 +12742,6 @@ CSortFaces.prototype =
sortParallelepipeds: function(parallelepipeds) sortParallelepipeds: function(parallelepipeds)
{ {
var intersectionsParallelepipeds = this._getIntersectionsParallelepipeds(parallelepipeds); var intersectionsParallelepipeds = this._getIntersectionsParallelepipeds(parallelepipeds);
var intersections = intersectionsParallelepipeds.intersections;
var revIntersections = intersectionsParallelepipeds.reverseIntersections; var revIntersections = intersectionsParallelepipeds.reverseIntersections;
var countIntersection = intersectionsParallelepipeds.countIntersection; var countIntersection = intersectionsParallelepipeds.countIntersection;
...@@ -12904,9 +12852,6 @@ CSortFaces.prototype = ...@@ -12904,9 +12852,6 @@ CSortFaces.prototype =
for(var m = 0; m < parallelepipeds.length; m++) for(var m = 0; m < parallelepipeds.length; m++)
{ {
//ищем пересечения с данным параллалепипедом
var toParallalepiped = parallelepipeds[m];
if(m === i || usuallyIntersect[i] === m || usuallyIntersectRev[i] === m) if(m === i || usuallyIntersect[i] === m || usuallyIntersectRev[i] === m)
{ {
continue; continue;
...@@ -12959,8 +12904,6 @@ CSortFaces.prototype = ...@@ -12959,8 +12904,6 @@ CSortFaces.prototype =
sortFaces: function(faces) sortFaces: function(faces)
{ {
var firstVerges = [];
var lastVerges = [];
var t = this; var t = this;
var iterCount = 0; var iterCount = 0;
...@@ -13009,10 +12952,8 @@ CSortFaces.prototype = ...@@ -13009,10 +12952,8 @@ CSortFaces.prototype =
_isIntersectionFacesPointLines: function(plainVerge, i, sortZIndexPaths) _isIntersectionFacesPointLines: function(plainVerge, i, sortZIndexPaths)
{ {
var res = false; var res = false;
var t = this; var t = this;
var lineArray = [];
for(var j = 0; j < plainVerge.points.length; j++) for(var j = 0; j < plainVerge.points.length; j++)
{ {
var pointFromVerge = plainVerge.points[j]; var pointFromVerge = plainVerge.points[j];
...@@ -13039,8 +12980,6 @@ CSortFaces.prototype = ...@@ -13039,8 +12980,6 @@ CSortFaces.prototype =
if(k === i) if(k === i)
continue; continue;
var plainEqucation = sortZIndexPaths[k].plainEquation;
if(this._isIntersectionFaceAndLine(sortZIndexPaths[k], lineEqucation, pointFromVerge, i, j, k)) if(this._isIntersectionFaceAndLine(sortZIndexPaths[k], lineEqucation, pointFromVerge, i, j, k))
{ {
res = true; res = true;
...@@ -13052,7 +12991,7 @@ CSortFaces.prototype = ...@@ -13052,7 +12991,7 @@ CSortFaces.prototype =
}, },
//пересечение прямой гранью //пересечение прямой гранью
_isIntersectionFaceAndLine: function(plain, lineEquation, pointFromVerge, i, j, k) _isIntersectionFaceAndLine: function(plain, lineEquation, pointFromVerge)
{ {
var res = false; var res = false;
var t = this; var t = this;
......
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