Commit ed17efc5 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@60980 954022d7-b5bf-4e40-9824-e11837661b57
parent 37c0541a
...@@ -118,24 +118,24 @@ CChartsDrawer.prototype = ...@@ -118,24 +118,24 @@ CChartsDrawer.prototype =
//делаем полный пресчёт //делаем полный пресчёт
if(!chartSpace.bEmptySeries) if(!chartSpace.bEmptySeries)
{ {
this.areaChart.reCalculate(this.calcProp, null, this); this.areaChart.reCalculate(this);
this._calaculate3DProperties(chartSpace); this._calaculate3DProperties(chartSpace);
if(this.calcProp.type != "Pie" && this.calcProp.type != "DoughnutChart") if(this.calcProp.type != "Pie" && this.calcProp.type != "DoughnutChart")
this.gridChart.reCalculate(this.calcProp, this, chartSpace); this.gridChart.reCalculate(this);
} }
this.allAreaChart.reCalculate(this.calcProp); this.allAreaChart.reCalculate(this);
if(this.calcProp.type != "Pie" && this.calcProp.type != "DoughnutChart" && !chartSpace.bEmptySeries) if(this.calcProp.type != "Pie" && this.calcProp.type != "DoughnutChart" && !chartSpace.bEmptySeries)
{ {
this.catAxisChart.reCalculate(this.calcProp, null, chartSpace); this.catAxisChart.reCalculate(this);
this.valAxisChart.reCalculate(this.calcProp, null, chartSpace); this.valAxisChart.reCalculate(this);
} }
if(!chartSpace.bEmptySeries) if(!chartSpace.bEmptySeries)
this.chart.reCalculate(this, chartSpace); this.chart.reCalculate(this);
}, },
draw : function(chartSpace, graphics) draw : function(chartSpace, graphics)
...@@ -149,20 +149,20 @@ CChartsDrawer.prototype = ...@@ -149,20 +149,20 @@ CChartsDrawer.prototype =
this.cShapeDrawer = cShapeDrawer; this.cShapeDrawer = cShapeDrawer;
//отрисовываем без пересчёта //отрисовываем без пересчёта
this.allAreaChart.draw(this, cShapeDrawer, chartSpace); this.allAreaChart.draw(this);
if(!chartSpace.bEmptySeries) if(!chartSpace.bEmptySeries)
{ {
this.areaChart.draw(this, cShapeDrawer, chartSpace); this.areaChart.draw(this);
if(this.calcProp.type != "Pie" && this.calcProp.type != "DoughnutChart") if(this.calcProp.type != "Pie" && this.calcProp.type != "DoughnutChart")
{ {
this.gridChart.draw(this, cShapeDrawer, chartSpace); this.gridChart.draw(this);
this.catAxisChart.draw(this, cShapeDrawer, chartSpace); this.catAxisChart.draw(this);
this.valAxisChart.draw(this, cShapeDrawer, chartSpace); this.valAxisChart.draw(this);
} }
this.chart.draw(this, cShapeDrawer, chartSpace); this.chart.draw(this);
} }
}, },
...@@ -2282,30 +2282,31 @@ function drawBarChart() ...@@ -2282,30 +2282,31 @@ function drawBarChart()
drawBarChart.prototype = drawBarChart.prototype =
{ {
reCalculate : function(chartProp, cShapeDrawer) reCalculate : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.paths = {}; this.paths = {};
this.summBarVal = []; this.summBarVal = [];
this._reCalculateBars(); this._reCalculateBars();
}, },
draw : function(chartProp, cShapeDrawer) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this._DrawBars(); this._DrawBars();
}, },
_DrawBars: function() _DrawBars: function()
{ {
this.cShapeDrawer.Graphics.SaveGrState(); this.cChartDrawer.cShapeDrawer.Graphics.SaveGrState();
this.cShapeDrawer.Graphics.AddClipRect(this.chartProp.chartGutter._left / this.chartProp.pxToMM, (this.chartProp.chartGutter._top - 1) / this.chartProp.pxToMM, this.chartProp.trueWidth / this.chartProp.pxToMM, this.chartProp.trueHeight / this.chartProp.pxToMM); this.cChartDrawer.cShapeDrawer.Graphics.AddClipRect(this.chartProp.chartGutter._left / this.chartProp.pxToMM, (this.chartProp.chartGutter._top - 1) / this.chartProp.pxToMM, this.chartProp.trueWidth / this.chartProp.pxToMM, this.chartProp.trueHeight / this.chartProp.pxToMM);
var brush, pen, seria, numCache; var brush, pen, seria, numCache;
for (var i = 0; i < this.paths.series.length; i++) { for (var i = 0; i < this.paths.series.length; i++) {
...@@ -2327,27 +2328,27 @@ drawBarChart.prototype = ...@@ -2327,27 +2328,27 @@ drawBarChart.prototype =
this.cChartDrawer.drawPath(this.paths.series[i][j], pen, brush); this.cChartDrawer.drawPath(this.paths.series[i][j], pen, brush);
} }
} }
this.cShapeDrawer.Graphics.RestoreGrState(); this.cChartDrawer.cShapeDrawer.Graphics.RestoreGrState();
}, },
_reCalculateBars: function (/*isSkip*/) _reCalculateBars: function (/*isSkip*/)
{ {
//соответствует подписям оси категорий(OX) //соответствует подписям оси категорий(OX)
var xPoints = this.cShapeDrawer.chart.plotArea.catAx.xPoints; var xPoints = this.cChartSpace.chart.plotArea.catAx.xPoints;
//соответствует подписям оси значений(OY) //соответствует подписям оси значений(OY)
var yPoints = this.cShapeDrawer.chart.plotArea.valAx.yPoints; var yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints;
var widthGraph = this.chartProp.widthCanvas - this.chartProp.chartGutter._left - this.chartProp.chartGutter._right; var widthGraph = this.chartProp.widthCanvas - this.chartProp.chartGutter._left - this.chartProp.chartGutter._right;
//TODO - передавать overlap из меню! //TODO - передавать overlap из меню!
var defaultOverlap = (this.chartProp.subType == "stacked" || this.chartProp.subType == "stackedPer") ? 100 : 0; var defaultOverlap = (this.chartProp.subType == "stacked" || this.chartProp.subType == "stackedPer") ? 100 : 0;
var overlap = this.cShapeDrawer.chart.plotArea.chart.overlap ? this.cShapeDrawer.chart.plotArea.chart.overlap : defaultOverlap; var overlap = this.cChartSpace.chart.plotArea.chart.overlap ? this.cChartSpace.chart.plotArea.chart.overlap : defaultOverlap;
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;
var width = widthGraph / this.chartProp.ptCount; var width = widthGraph / this.chartProp.ptCount;
if(this.cShapeDrawer.chart.plotArea.catAx.crossAx.crossBetween) if(this.cChartSpace.chart.plotArea.catAx.crossAx.crossBetween)
width = widthGraph / (numCache.ptCount - 1); width = widthGraph / (numCache.ptCount - 1);
var gapWidth = this.cShapeDrawer.chart.plotArea.chart.gapWidth ? this.cShapeDrawer.chart.plotArea.chart.gapWidth : 150; var gapWidth = this.cChartSpace.chart.plotArea.chart.gapWidth ? this.cChartSpace.chart.plotArea.chart.gapWidth : 150;
var individualBarWidth = width / (this.chartProp.seriesCount - (this.chartProp.seriesCount - 1) * (overlap / 100) + gapWidth / 100); var individualBarWidth = width / (this.chartProp.seriesCount - (this.chartProp.seriesCount - 1) * (overlap / 100) + gapWidth / 100);
var widthOverLap = individualBarWidth * (overlap / 100); var widthOverLap = individualBarWidth * (overlap / 100);
...@@ -2390,23 +2391,23 @@ drawBarChart.prototype = ...@@ -2390,23 +2391,23 @@ drawBarChart.prototype =
seriesHeight[i][idx] = height; seriesHeight[i][idx] = height;
//стартовая позиция колонки X //стартовая позиция колонки X
if(this.cShapeDrawer.chart.plotArea.catAx.scaling.orientation == ORIENTATION_MIN_MAX) if(this.cChartSpace.chart.plotArea.catAx.scaling.orientation == ORIENTATION_MIN_MAX)
{ {
if(xPoints[1] && xPoints[1].pos) if(xPoints[1] && xPoints[1].pos)
startXPosition = xPoints[idx].pos - Math.abs((xPoints[1].pos - xPoints[0].pos) / 2); startXPosition = xPoints[idx].pos - Math.abs((xPoints[1].pos - xPoints[0].pos) / 2);
else else
startXPosition = xPoints[idx].pos - Math.abs(xPoints[0].pos - this.cShapeDrawer.chart.plotArea.valAx.posX); startXPosition = xPoints[idx].pos - Math.abs(xPoints[0].pos - this.cChartSpace.chart.plotArea.valAx.posX);
} }
else else
{ {
if(xPoints[1] && xPoints[1].pos) if(xPoints[1] && xPoints[1].pos)
startXPosition = xPoints[idx].pos + Math.abs((xPoints[1].pos - xPoints[0].pos) / 2); startXPosition = xPoints[idx].pos + Math.abs((xPoints[1].pos - xPoints[0].pos) / 2);
else else
startXPosition = xPoints[idx].pos + Math.abs(xPoints[0].pos - this.cShapeDrawer.chart.plotArea.valAx.posX); startXPosition = xPoints[idx].pos + Math.abs(xPoints[0].pos - this.cChartSpace.chart.plotArea.valAx.posX);
} }
if(this.cShapeDrawer.chart.plotArea.catAx.scaling.orientation == ORIENTATION_MIN_MAX) if(this.cChartSpace.chart.plotArea.catAx.scaling.orientation == ORIENTATION_MIN_MAX)
{ {
if(seriesCounter == 0) if(seriesCounter == 0)
startX = startXPosition * this.chartProp.pxToMM + hmargin + seriesCounter * (individualBarWidth); startX = startXPosition * this.chartProp.pxToMM + hmargin + seriesCounter * (individualBarWidth);
...@@ -2425,11 +2426,11 @@ drawBarChart.prototype = ...@@ -2425,11 +2426,11 @@ drawBarChart.prototype =
//if(height != 0) //if(height != 0)
//{ //{
newStartX = startX; newStartX = startX;
if(this.cShapeDrawer.chart.plotArea.catAx.scaling.orientation != ORIENTATION_MIN_MAX) if(this.cChartSpace.chart.plotArea.catAx.scaling.orientation != ORIENTATION_MIN_MAX)
newStartX = startX - individualBarWidth; newStartX = startX - individualBarWidth;
newStartY = startY; newStartY = startY;
if(this.cShapeDrawer.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX && (this.chartProp.subType == "stackedPer" || this.chartProp.subType == "stacked")) if(this.cChartSpace.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX && (this.chartProp.subType == "stackedPer" || this.chartProp.subType == "stacked"))
newStartY = startY + height; newStartY = startY + height;
paths = this._calculateRect(newStartX, newStartY, individualBarWidth, height); paths = this._calculateRect(newStartX, newStartY, individualBarWidth, height);
...@@ -2451,7 +2452,7 @@ drawBarChart.prototype = ...@@ -2451,7 +2452,7 @@ drawBarChart.prototype =
_getStartYColumnPosition: function (seriesHeight, i, j, val, yPoints, prevVal) _getStartYColumnPosition: function (seriesHeight, i, j, val, yPoints, prevVal)
{ {
var startY, diffYVal, height, numCache, tempLogVal, tempPrevLogVal, curVal, prevVal, endBlockPosition, startBlockPosition; var startY, diffYVal, height, numCache, tempLogVal, tempPrevLogVal, curVal, prevVal, endBlockPosition, startBlockPosition;
var nullPositionOX = this.cShapeDrawer.chart.plotArea.valAx && this.cShapeDrawer.chart.plotArea.valAx.scaling.logBase ? this.chartProp.nullPositionOXLog : this.cShapeDrawer.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;
if(this.chartProp.subType == "stacked") if(this.chartProp.subType == "stacked")
...@@ -2465,7 +2466,7 @@ drawBarChart.prototype = ...@@ -2465,7 +2466,7 @@ drawBarChart.prototype =
startY = startBlockPosition; startY = startBlockPosition;
height = startBlockPosition - endBlockPosition; height = startBlockPosition - endBlockPosition;
if(this.cShapeDrawer.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX) if(this.cChartSpace.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX)
height = - height; height = - height;
} }
else if(this.chartProp.subType == "stackedPer") else if(this.chartProp.subType == "stackedPer")
...@@ -2481,15 +2482,15 @@ drawBarChart.prototype = ...@@ -2481,15 +2482,15 @@ drawBarChart.prototype =
startY = startBlockPosition; startY = startBlockPosition;
height = startBlockPosition - endBlockPosition; height = startBlockPosition - endBlockPosition;
if(this.cShapeDrawer.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX) if(this.cChartSpace.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX)
height = - height; height = - height;
} }
else else
{ {
startY = nullPositionOX; startY = nullPositionOX;
if(this.cShapeDrawer.chart.plotArea.valAx && this.cShapeDrawer.chart.plotArea.valAx.scaling.logBase)//исключение для логарифмической шкалы if(this.cChartSpace.chart.plotArea.valAx && this.cChartSpace.chart.plotArea.valAx.scaling.logBase)//исключение для логарифмической шкалы
{ {
height = nullPositionOX - this.cChartDrawer.getYPosition(val, yPoints, null,this.cShapeDrawer.chart.plotArea.valAx.scaling.logBase) * this.chartProp.pxToMM; height = nullPositionOX - this.cChartDrawer.getYPosition(val, yPoints, null,this.cChartSpace.chart.plotArea.valAx.scaling.logBase) * this.chartProp.pxToMM;
} }
else else
{ {
...@@ -2687,20 +2688,22 @@ function drawLineChart() ...@@ -2687,20 +2688,22 @@ function drawLineChart()
drawLineChart.prototype = drawLineChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this._drawLines(); this._drawLines();
}, },
reCalculate : function(chartProp, cChartSpace) reCalculate : function(chartsDrawer)
{ {
this.paths = {}; this.paths = {};
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cChartSpace = cChartSpace; this.cChartSpace = chartsDrawer.cChartSpace;
this._calculateLines(); this._calculateLines();
}, },
...@@ -2924,8 +2927,8 @@ drawLineChart.prototype = ...@@ -2924,8 +2927,8 @@ drawLineChart.prototype =
{ {
var brush, pen, dataSeries, seria, markerBrush, markerPen, numCache; var brush, pen, dataSeries, seria, markerBrush, markerPen, numCache;
this.cShapeDrawer.Graphics.SaveGrState(); this.cChartDrawer.cShapeDrawer.Graphics.SaveGrState();
this.cShapeDrawer.Graphics.AddClipRect(this.chartProp.chartGutter._left / this.chartProp.pxToMM, (this.chartProp.chartGutter._top - 2) / this.chartProp.pxToMM, this.chartProp.trueWidth / this.chartProp.pxToMM, this.chartProp.trueHeight / this.chartProp.pxToMM); this.cChartDrawer.cShapeDrawer.Graphics.AddClipRect(this.chartProp.chartGutter._left / this.chartProp.pxToMM, (this.chartProp.chartGutter._top - 2) / this.chartProp.pxToMM, this.chartProp.trueWidth / this.chartProp.pxToMM, this.chartProp.trueHeight / this.chartProp.pxToMM);
for (var i = 0; i < this.paths.series.length; i++) { for (var i = 0; i < this.paths.series.length; i++) {
seria = this.chartProp.series[i]; seria = this.chartProp.series[i];
brush = seria.brush; brush = seria.brush;
...@@ -2964,7 +2967,7 @@ drawLineChart.prototype = ...@@ -2964,7 +2967,7 @@ drawLineChart.prototype =
this.cChartDrawer.drawPath(this.paths.points[i][k].path, markerPen, markerBrush, true); this.cChartDrawer.drawPath(this.paths.points[i][k].path, markerPen, markerBrush, true);
} }
} }
this.cShapeDrawer.Graphics.RestoreGrState(); this.cChartDrawer.cShapeDrawer.Graphics.RestoreGrState();
}, },
_getYVal: function(n, i) _getYVal: function(n, i)
...@@ -3083,21 +3086,23 @@ function drawAreaChart() ...@@ -3083,21 +3086,23 @@ function drawAreaChart()
drawAreaChart.prototype = drawAreaChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this._drawLines(); this._drawLines();
}, },
reCalculate : function(chartProp, cChartSpace) reCalculate : function(chartsDrawer)
{ {
this.paths = {}; this.paths = {};
this.points = null; this.points = null;
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cChartSpace = cChartSpace; this.cChartSpace = chartsDrawer.cChartSpace;
this._calculateLines(); this._calculateLines();
}, },
...@@ -3357,8 +3362,8 @@ drawAreaChart.prototype = ...@@ -3357,8 +3362,8 @@ drawAreaChart.prototype =
var pen; var pen;
var seria, dataSeries; var seria, dataSeries;
this.cShapeDrawer.Graphics.SaveGrState(); this.cChartDrawer.cShapeDrawer.Graphics.SaveGrState();
this.cShapeDrawer.Graphics.AddClipRect(this.chartProp.chartGutter._left / this.chartProp.pxToMM, (this.chartProp.chartGutter._top - 1) / this.chartProp.pxToMM, this.chartProp.trueWidth / this.chartProp.pxToMM, this.chartProp.trueHeight / this.chartProp.pxToMM); this.cChartDrawer.cShapeDrawer.Graphics.AddClipRect(this.chartProp.chartGutter._left / this.chartProp.pxToMM, (this.chartProp.chartGutter._top - 1) / this.chartProp.pxToMM, this.chartProp.trueWidth / this.chartProp.pxToMM, this.chartProp.trueHeight / this.chartProp.pxToMM);
for (var i = 0; i < this.chartProp.series.length; i++) { for (var i = 0; i < this.chartProp.series.length; i++) {
...@@ -3381,7 +3386,7 @@ drawAreaChart.prototype = ...@@ -3381,7 +3386,7 @@ drawAreaChart.prototype =
this.cChartDrawer.drawPath(this.paths.series[i], pen, brush); this.cChartDrawer.drawPath(this.paths.series[i], pen, brush);
} }
this.cShapeDrawer.Graphics.RestoreGrState(); this.cChartDrawer.cShapeDrawer.Graphics.RestoreGrState();
}, },
_getYVal: function(n, i) _getYVal: function(n, i)
...@@ -3444,40 +3449,43 @@ function drawHBarChart() ...@@ -3444,40 +3449,43 @@ function drawHBarChart()
drawHBarChart.prototype = drawHBarChart.prototype =
{ {
reCalculate : function(chartProp, cShapeDrawer) reCalculate : function(chartsDrawer)
{ {
this.paths = {}; this.paths = {};
this.chartProp = chartProp.calcProp;
this.cChartDrawer = chartProp;
this.cShapeDrawer = cShapeDrawer;
this.summBarVal = []; this.summBarVal = [];
this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartsDrawer;
this.cChartSpace = chartsDrawer.cChartSpace;
this._recalculateBars(); this._recalculateBars();
}, },
draw : function(chartProp, cShapeDrawer) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this._drawBars(); this._drawBars();
}, },
_recalculateBars: function (/*isSkip*/) _recalculateBars: function (/*isSkip*/)
{ {
//соответствует подписям оси категорий(OX) //соответствует подписям оси категорий(OX)
var xPoints = this.cShapeDrawer.chart.plotArea.valAx.xPoints; var xPoints = this.cChartSpace.chart.plotArea.valAx.xPoints;
//соответствует подписям оси значений(OY) //соответствует подписям оси значений(OY)
var yPoints = this.cShapeDrawer.chart.plotArea.catAx.yPoints; var yPoints = this.cChartSpace.chart.plotArea.catAx.yPoints;
var xaxispos = this.chartProp.xaxispos; 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;
var overlap = this.cShapeDrawer.chart.plotArea.chart.overlap ? this.cShapeDrawer.chart.plotArea.chart.overlap : defaultOverlap; var overlap = this.cChartSpace.chart.plotArea.chart.overlap ? this.cChartSpace.chart.plotArea.chart.overlap : defaultOverlap;
var ptCount = this.cChartDrawer.getPtCount(this.chartProp.series); var ptCount = this.cChartDrawer.getPtCount(this.chartProp.series);
var height = heightGraph / ptCount; var height = heightGraph / ptCount;
var gapWidth = this.cShapeDrawer.chart.plotArea.chart.gapWidth ? this.cShapeDrawer.chart.plotArea.chart.gapWidth : 150; var gapWidth = this.cChartSpace.chart.plotArea.chart.gapWidth ? this.cChartSpace.chart.plotArea.chart.gapWidth : 150;
var individualBarHeight = height / (this.chartProp.seriesCount - (this.chartProp.seriesCount - 1) * (overlap / 100) + gapWidth / 100); var individualBarHeight = height / (this.chartProp.seriesCount - (this.chartProp.seriesCount - 1) * (overlap / 100) + gapWidth / 100);
var widthOverLap = individualBarHeight * (overlap / 100); var widthOverLap = individualBarHeight * (overlap / 100);
...@@ -3498,8 +3506,8 @@ drawHBarChart.prototype = ...@@ -3498,8 +3506,8 @@ drawHBarChart.prototype =
//стартовая позиция колонки Y(+ высота с учётом поправок на накопительные диаграммы) //стартовая позиция колонки Y(+ высота с учётом поправок на накопительные диаграммы)
val = parseFloat(seria[j].val); val = parseFloat(seria[j].val);
if(this.cShapeDrawer.chart.plotArea.valAx && this.cShapeDrawer.chart.plotArea.valAx.scaling.logBase) if(this.cChartSpace.chart.plotArea.valAx && this.cChartSpace.chart.plotArea.valAx.scaling.logBase)
val = this.cChartDrawer.getLogarithmicValue(val, this.cShapeDrawer.chart.plotArea.valAx.scaling.logBase, xPoints); val = this.cChartDrawer.getLogarithmicValue(val, this.cChartSpace.chart.plotArea.valAx.scaling.logBase, xPoints);
idx = seria[j].idx != null ? seria[j].idx : j; idx = seria[j].idx != null ? seria[j].idx : j;
...@@ -3513,23 +3521,23 @@ drawHBarChart.prototype = ...@@ -3513,23 +3521,23 @@ drawHBarChart.prototype =
//стартовая позиция колонки Y //стартовая позиция колонки Y
if(this.cShapeDrawer.chart.plotArea.catAx.scaling.orientation == ORIENTATION_MIN_MAX) if(this.cChartSpace.chart.plotArea.catAx.scaling.orientation == ORIENTATION_MIN_MAX)
{ {
if(yPoints[1] && yPoints[1].pos) if(yPoints[1] && yPoints[1].pos)
startYPosition = yPoints[idx].pos + Math.abs((yPoints[1].pos - yPoints[0].pos) / 2); startYPosition = yPoints[idx].pos + Math.abs((yPoints[1].pos - yPoints[0].pos) / 2);
else else
startYPosition = yPoints[idx].pos + Math.abs(yPoints[0].pos - this.cShapeDrawer.chart.plotArea.valAx.posY); startYPosition = yPoints[idx].pos + Math.abs(yPoints[0].pos - this.cChartSpace.chart.plotArea.valAx.posY);
} }
else else
{ {
if(yPoints[1] && yPoints[1].pos) if(yPoints[1] && yPoints[1].pos)
startYPosition = yPoints[idx].pos - Math.abs((yPoints[1].pos - yPoints[0].pos) / 2); startYPosition = yPoints[idx].pos - Math.abs((yPoints[1].pos - yPoints[0].pos) / 2);
else else
startYPosition = yPoints[idx].pos - Math.abs(yPoints[0].pos - this.cShapeDrawer.chart.plotArea.valAx.posY); startYPosition = yPoints[idx].pos - Math.abs(yPoints[0].pos - this.cChartSpace.chart.plotArea.valAx.posY);
} }
if(this.cShapeDrawer.chart.plotArea.catAx.scaling.orientation == ORIENTATION_MIN_MAX) if(this.cChartSpace.chart.plotArea.catAx.scaling.orientation == ORIENTATION_MIN_MAX)
{ {
if(seriesCounter == 0) if(seriesCounter == 0)
startY = startYPosition * this.chartProp.pxToMM - hmargin - seriesCounter * (individualBarHeight); startY = startYPosition * this.chartProp.pxToMM - hmargin - seriesCounter * (individualBarHeight);
...@@ -3547,12 +3555,12 @@ drawHBarChart.prototype = ...@@ -3547,12 +3555,12 @@ drawHBarChart.prototype =
newStartY = startY; newStartY = startY;
if(this.cShapeDrawer.chart.plotArea.catAx.scaling.orientation != ORIENTATION_MIN_MAX) if(this.cChartSpace.chart.plotArea.catAx.scaling.orientation != ORIENTATION_MIN_MAX)
newStartY = startY + individualBarHeight; newStartY = startY + individualBarHeight;
newStartX = startX; newStartX = startX;
if(this.cShapeDrawer.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX && (this.chartProp.subType == "stackedPer" || this.chartProp.subType == "stacked")) if(this.cChartSpace.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX && (this.chartProp.subType == "stackedPer" || this.chartProp.subType == "stacked"))
newStartX = startX - width; newStartX = startX - width;
paths = this._calculateRect(newStartX, newStartY / this.chartProp.pxToMM, width, individualBarHeight / this.chartProp.pxToMM); paths = this._calculateRect(newStartX, newStartY / this.chartProp.pxToMM, width, individualBarHeight / this.chartProp.pxToMM);
...@@ -3574,7 +3582,7 @@ drawHBarChart.prototype = ...@@ -3574,7 +3582,7 @@ drawHBarChart.prototype =
_getStartYColumnPosition: function (seriesHeight, j, i, val, xPoints, summBarVal) _getStartYColumnPosition: function (seriesHeight, j, i, val, xPoints, summBarVal)
{ {
var startY, diffYVal, width, numCache, dVal, curVal, prevVal, endBlockPosition, startBlockPosition; var startY, diffYVal, width, numCache, dVal, curVal, prevVal, endBlockPosition, startBlockPosition;
var nullPositionOX = this.cShapeDrawer.chart.plotArea.catAx.posX ? this.cShapeDrawer.chart.plotArea.catAx.posX * this.chartProp.pxToMM : this.cShapeDrawer.chart.plotArea.catAx.xPos * this.chartProp.pxToMM; var nullPositionOX = this.cChartSpace.chart.plotArea.catAx.posX ? this.cChartSpace.chart.plotArea.catAx.posX * this.chartProp.pxToMM : this.cChartSpace.chart.plotArea.catAx.xPos * this.chartProp.pxToMM;
if(this.chartProp.subType == "stacked") if(this.chartProp.subType == "stacked")
{ {
curVal = this._getStackedValue(this.chartProp.series, i, j, val); curVal = this._getStackedValue(this.chartProp.series, i, j, val);
...@@ -3586,7 +3594,7 @@ drawHBarChart.prototype = ...@@ -3586,7 +3594,7 @@ drawHBarChart.prototype =
startY = startBlockPosition; startY = startBlockPosition;
width = endBlockPosition - startBlockPosition; width = endBlockPosition - startBlockPosition;
if(this.cShapeDrawer.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX) if(this.cChartSpace.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX)
width = - width; width = - width;
} }
else if(this.chartProp.subType == "stackedPer") else if(this.chartProp.subType == "stackedPer")
...@@ -3602,7 +3610,7 @@ drawHBarChart.prototype = ...@@ -3602,7 +3610,7 @@ drawHBarChart.prototype =
startY = startBlockPosition; startY = startBlockPosition;
width = endBlockPosition - startBlockPosition; width = endBlockPosition - startBlockPosition;
if(this.cShapeDrawer.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX) if(this.cChartSpace.chart.plotArea.valAx.scaling.orientation != ORIENTATION_MIN_MAX)
width = - width; width = - width;
} }
else else
...@@ -3697,8 +3705,8 @@ drawHBarChart.prototype = ...@@ -3697,8 +3705,8 @@ drawHBarChart.prototype =
var numCache; var numCache;
var seria; var seria;
this.cShapeDrawer.Graphics.SaveGrState(); this.cChartDrawer.cShapeDrawer.Graphics.SaveGrState();
this.cShapeDrawer.Graphics.AddClipRect(this.chartProp.chartGutter._left / this.chartProp.pxToMM, (this.chartProp.chartGutter._top - 1) / this.chartProp.pxToMM, this.chartProp.trueWidth / this.chartProp.pxToMM, this.chartProp.trueHeight / this.chartProp.pxToMM); this.cChartDrawer.cShapeDrawer.Graphics.AddClipRect(this.chartProp.chartGutter._left / this.chartProp.pxToMM, (this.chartProp.chartGutter._top - 1) / this.chartProp.pxToMM, this.chartProp.trueWidth / this.chartProp.pxToMM, this.chartProp.trueHeight / this.chartProp.pxToMM);
for (var i = 0; i < this.paths.series.length; i++) { for (var i = 0; i < this.paths.series.length; i++) {
if(!this.paths.series[i]) if(!this.paths.series[i])
...@@ -3719,7 +3727,7 @@ drawHBarChart.prototype = ...@@ -3719,7 +3727,7 @@ drawHBarChart.prototype =
this.cChartDrawer.drawPath(this.paths.series[i][j], pen, brush); this.cChartDrawer.drawPath(this.paths.series[i][j], pen, brush);
} }
} }
this.cShapeDrawer.Graphics.RestoreGrState(); this.cChartDrawer.cShapeDrawer.Graphics.RestoreGrState();
}, },
_calculateDLbl: function(chartSpace, ser, val) _calculateDLbl: function(chartSpace, ser, val)
...@@ -3828,19 +3836,21 @@ function drawPieChart() ...@@ -3828,19 +3836,21 @@ function drawPieChart()
drawPieChart.prototype = drawPieChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this._drawPie(); this._drawPie();
}, },
reCalculate : function(chartProp, cShapeDrawer) reCalculate : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.tempAngle = null; this.tempAngle = null;
this.paths = {}; this.paths = {};
this._reCalculatePie(); this._reCalculatePie();
...@@ -4101,19 +4111,21 @@ function drawDoughnutChart() ...@@ -4101,19 +4111,21 @@ function drawDoughnutChart()
drawDoughnutChart.prototype = drawDoughnutChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this._drawPie(); this._drawPie();
}, },
reCalculate : function(chartProp, cShapeDrawer) reCalculate : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.tempAngle = null; this.tempAngle = null;
this.paths = {}; this.paths = {};
this._reCalculatePie(); this._reCalculatePie();
...@@ -4154,10 +4166,10 @@ drawDoughnutChart.prototype = ...@@ -4154,10 +4166,10 @@ drawDoughnutChart.prototype =
//% from out radius //% from out radius
var defaultSize = 50; var defaultSize = 50;
var holeSize = this.cShapeDrawer.chart.plotArea.chart.holeSize ? this.cShapeDrawer.chart.plotArea.chart.holeSize : defaultSize; var holeSize = this.cChartSpace.chart.plotArea.chart.holeSize ? this.cChartSpace.chart.plotArea.chart.holeSize : defaultSize;
//first ang //first ang
var firstSliceAng = this.cShapeDrawer.chart.plotArea.chart.firstSliceAng ? this.cShapeDrawer.chart.plotArea.chart.firstSliceAng : 0; var firstSliceAng = this.cChartSpace.chart.plotArea.chart.firstSliceAng ? this.cChartSpace.chart.plotArea.chart.firstSliceAng : 0;
firstSliceAng = (firstSliceAng / 360) * (Math.PI * 2); firstSliceAng = (firstSliceAng / 360) * (Math.PI * 2);
//inner radius //inner radius
...@@ -4319,27 +4331,29 @@ function drawRadarChart() ...@@ -4319,27 +4331,29 @@ function drawRadarChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cChartDrawer = null; this.cChartDrawer = null;
this.cShapeDrawer = null;
this.cChartSpace = null; this.cChartSpace = null;
this.paths = {}; this.paths = {};
} }
drawRadarChart.prototype = drawRadarChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this._drawLines(); this._drawLines();
}, },
reCalculate : function(chartProp, cChartSpace) reCalculate : function(chartsDrawer)
{ {
this.paths = {}; this.paths = {};
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cChartSpace = cChartSpace; this.cChartSpace = chartsDrawer.cChartSpace;
this._calculateLines(); this._calculateLines();
}, },
...@@ -4677,29 +4691,27 @@ function drawScatterChart() ...@@ -4677,29 +4691,27 @@ function drawScatterChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cChartDrawer = null; this.cChartDrawer = null;
this.cShapeDrawer = null; this.cChartSpace = null;
this.paths = {}; this.paths = {};
} }
drawScatterChart.prototype = drawScatterChart.prototype =
{ {
reCalculate : function(chartProp, cShapeDrawer) reCalculate : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.cChartSpace = cShapeDrawer;
this.paths = {}; this.paths = {};
this._recalculateScatter(); this._recalculateScatter();
}, },
draw : function(chartProp, cShapeDrawer) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.cChartSpace = cShapeDrawer;
this._drawScatter(); this._drawScatter();
}, },
...@@ -4764,9 +4776,9 @@ drawScatterChart.prototype = ...@@ -4764,9 +4776,9 @@ drawScatterChart.prototype =
_recalculateScatter: function () _recalculateScatter: function ()
{ {
//соответствует подписям оси категорий(OX) //соответствует подписям оси категорий(OX)
var xPoints = this.cShapeDrawer.chart.plotArea.catAx.xPoints; var xPoints = this.cChartSpace.chart.plotArea.catAx.xPoints;
//соответствует подписям оси значений(OY) //соответствует подписям оси значений(OY)
var yPoints = this.cShapeDrawer.chart.plotArea.valAx.yPoints; var yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints;
var trueHeight = this.chartProp.trueHeight; var trueHeight = this.chartProp.trueHeight;
var trueWidth = this.chartProp.trueWidth; var trueWidth = this.chartProp.trueWidth;
...@@ -4902,8 +4914,8 @@ drawScatterChart.prototype = ...@@ -4902,8 +4914,8 @@ drawScatterChart.prototype =
{ {
var brush, pen, dataSeries, seria, markerBrush, markerPen, numCache; var brush, pen, dataSeries, seria, markerBrush, markerPen, numCache;
this.cShapeDrawer.Graphics.SaveGrState(); this.cChartDrawer.cShapeDrawer.Graphics.SaveGrState();
this.cShapeDrawer.Graphics.AddClipRect(this.chartProp.chartGutter._left / this.chartProp.pxToMM, (this.chartProp.chartGutter._top - 2) / this.chartProp.pxToMM, this.chartProp.trueWidth / this.chartProp.pxToMM, this.chartProp.trueHeight / this.chartProp.pxToMM); this.cChartDrawer.cShapeDrawer.Graphics.AddClipRect(this.chartProp.chartGutter._left / this.chartProp.pxToMM, (this.chartProp.chartGutter._top - 2) / this.chartProp.pxToMM, this.chartProp.trueWidth / this.chartProp.pxToMM, this.chartProp.trueHeight / this.chartProp.pxToMM);
for (var i = 0; i < this.paths.series.length; i++) { for (var i = 0; i < this.paths.series.length; i++) {
seria = this.chartProp.series[i]; seria = this.chartProp.series[i];
brush = seria.brush; brush = seria.brush;
...@@ -4942,7 +4954,7 @@ drawScatterChart.prototype = ...@@ -4942,7 +4954,7 @@ drawScatterChart.prototype =
this.cChartDrawer.drawPath(this.paths.points[i][k].path, markerPen, markerBrush, true); this.cChartDrawer.drawPath(this.paths.points[i][k].path, markerPen, markerBrush, true);
} }
} }
this.cShapeDrawer.Graphics.RestoreGrState(); this.cChartDrawer.cShapeDrawer.Graphics.RestoreGrState();
}, },
_getYPosition: function(val, yPoints, isOx) _getYPosition: function(val, yPoints, isOx)
...@@ -5136,28 +5148,28 @@ function drawStockChart() ...@@ -5136,28 +5148,28 @@ function drawStockChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cChartDrawer = null; this.cChartDrawer = null;
this.cShapeDrawer = null;
this.cChartSpace = null; this.cChartSpace = null;
this.paths = {}; this.paths = {};
} }
drawStockChart.prototype = drawStockChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer, chartSpace) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.cChartSpace = chartSpace;
this._drawLines(); this._drawLines();
}, },
reCalculate : function(chartProp, cChartSpace) reCalculate : function(chartsDrawer)
{ {
this.paths = {}; this.paths = {};
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cChartSpace = cChartSpace; this.cChartSpace = chartsDrawer.cChartSpace;
this._calculateLines(); this._calculateLines();
}, },
...@@ -5429,27 +5441,27 @@ function drawBubbleChart() ...@@ -5429,27 +5441,27 @@ function drawBubbleChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cChartDrawer = null; this.cChartDrawer = null;
this.cShapeDrawer = null; this.cChartSpace = null;
this.paths = {}; this.paths = {};
} }
drawBubbleChart.prototype = drawBubbleChart.prototype =
{ {
reCalculate : function(chartProp, cShapeDrawer) reCalculate : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartProp.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.paths = {}; this.paths = {};
this._recalculateScatter(); this._recalculateScatter();
}, },
draw : function(chartProp, cShapeDrawer) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartProp.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this._drawScatter(); this._drawScatter();
}, },
...@@ -5457,9 +5469,9 @@ drawBubbleChart.prototype = ...@@ -5457,9 +5469,9 @@ drawBubbleChart.prototype =
_recalculateScatter: function () _recalculateScatter: function ()
{ {
//соответствует подписям оси категорий(OX) //соответствует подписям оси категорий(OX)
var xPoints = this.cShapeDrawer.chart.plotArea.catAx.xPoints; var xPoints = this.cChartSpace.chart.plotArea.catAx.xPoints;
//соответствует подписям оси значений(OY) //соответствует подписям оси значений(OY)
var yPoints = this.cShapeDrawer.chart.plotArea.valAx.yPoints; var yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints;
var trueHeight = this.chartProp.trueHeight; var trueHeight = this.chartProp.trueHeight;
var trueWidth = this.chartProp.trueWidth; var trueWidth = this.chartProp.trueWidth;
...@@ -5677,7 +5689,7 @@ drawBubbleChart.prototype = ...@@ -5677,7 +5689,7 @@ drawBubbleChart.prototype =
maxSize = this.cChartDrawer._getMaxMinValueArray(bubbleSize).max; maxSize = this.cChartDrawer._getMaxMinValueArray(bubbleSize).max;
curSize = bubbleSize[k].val; curSize = bubbleSize[k].val;
yPoints = this.chartSpace.chart.plotArea.valAx.yPoints ? this.chartSpace.chart.plotArea.valAx.yPoints : this.chartSpace.chart.plotArea.catAx.yPoints; yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints ? this.cChartSpace.chart.plotArea.valAx.yPoints : this.cChartSpace.chart.plotArea.catAx.yPoints;
maxDiamBubble = Math.abs(yPoints[1].pos - yPoints[0].pos) * 2; maxDiamBubble = Math.abs(yPoints[1].pos - yPoints[0].pos) * 2;
diffSize = maxSize / curSize; diffSize = maxSize / curSize;
...@@ -5720,8 +5732,7 @@ drawBubbleChart.prototype = ...@@ -5720,8 +5732,7 @@ drawBubbleChart.prototype =
function gridChart() function gridChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cShapeDrawer = null; this.cChartSpace = null;
this.chartSpace = null;
this.cChartDrawer = null; this.cChartDrawer = null;
this.paths = {}; this.paths = {};
...@@ -5729,23 +5740,21 @@ function gridChart() ...@@ -5729,23 +5740,21 @@ function gridChart()
gridChart.prototype = gridChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer, chartSpace) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.chartSpace = chartSpace; this.cChartDrawer = chartsDrawer;
this.cChartDrawer = chartProp;
this._drawHorisontalLines(); this._drawHorisontalLines();
this._drawVerticalLines(); this._drawVerticalLines();
}, },
reCalculate : function(chartProp, cShapeDrawer, chartSpace) reCalculate : function(chartsDrawer)
{ {
this.chartProp = chartProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.chartSpace = chartSpace; this.cChartDrawer = chartsDrawer;
this.cChartDrawer = chartProp;
this.paths = {}; this.paths = {};
this._calculateHorisontalLines(); this._calculateHorisontalLines();
...@@ -5769,20 +5778,20 @@ gridChart.prototype = ...@@ -5769,20 +5778,20 @@ gridChart.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 yPoints = this.chartSpace.chart.plotArea.valAx.yPoints ? this.chartSpace.chart.plotArea.valAx.yPoints : this.chartSpace.chart.plotArea.catAx.yPoints; var yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints ? this.cChartSpace.chart.plotArea.valAx.yPoints : this.cChartSpace.chart.plotArea.catAx.yPoints;
var crossBetween = this.chartSpace.chart.plotArea.valAx.crossBetween; var crossBetween = this.cChartSpace.chart.plotArea.valAx.crossBetween;
var crossDiff; var crossDiff;
if(crossBetween == CROSS_BETWEEN_BETWEEN && this.chartSpace.chart.plotArea.valAx.posY) if(crossBetween == CROSS_BETWEEN_BETWEEN && this.cChartSpace.chart.plotArea.valAx.posY)
crossDiff = yPoints[1] ? Math.abs((yPoints[1].pos - yPoints[0].pos) / 2) : Math.abs(yPoints[0].pos - this.chartSpace.chart.plotArea.valAx.posY); crossDiff = yPoints[1] ? Math.abs((yPoints[1].pos - yPoints[0].pos) / 2) : Math.abs(yPoints[0].pos - this.cChartSpace.chart.plotArea.valAx.posY);
if(this.chartProp.type == "Radar") if(this.chartProp.type == "Radar")
{ {
var y, x, path; var y, x, path;
//соответствует подписям оси категорий(OX) //соответствует подписям оси категорий(OX)
if(this.chartSpace.chart.plotArea.valAx) if(this.cChartSpace.chart.plotArea.valAx)
var yPoints = this.chartSpace.chart.plotArea.valAx.yPoints; var 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;
...@@ -5895,19 +5904,19 @@ gridChart.prototype = ...@@ -5895,19 +5904,19 @@ gridChart.prototype =
var posY = this.chartProp.chartGutter._top; var posY = this.chartProp.chartGutter._top;
var posX; var posX;
var posMinorX; var posMinorX;
var xPoints = this.chartSpace.chart.plotArea.valAx.xPoints ? this.chartSpace.chart.plotArea.valAx.xPoints : this.chartSpace.chart.plotArea.catAx.xPoints; var xPoints = this.cChartSpace.chart.plotArea.valAx.xPoints ? this.cChartSpace.chart.plotArea.valAx.xPoints : this.cChartSpace.chart.plotArea.catAx.xPoints;
var stepX = xPoints[1] ? Math.abs((xPoints[1].pos - xPoints[0].pos)) : (Math.abs(xPoints[0].pos - this.chartSpace.chart.plotArea.valAx.posX) * 2); var stepX = xPoints[1] ? Math.abs((xPoints[1].pos - xPoints[0].pos)) : (Math.abs(xPoints[0].pos - this.cChartSpace.chart.plotArea.valAx.posX) * 2);
var minorStep = (stepX * this.chartProp.pxToMM) / this.chartProp.numvMinorlines; var minorStep = (stepX * this.chartProp.pxToMM) / this.chartProp.numvMinorlines;
if(!xPoints) if(!xPoints)
return; return;
var crossBetween = this.chartSpace.chart.plotArea.valAx.crossBetween; var crossBetween = this.cChartSpace.chart.plotArea.valAx.crossBetween;
var crossDiff; var crossDiff;
if(crossBetween == CROSS_BETWEEN_BETWEEN && this.chartSpace.chart.plotArea.valAx.posX && this.chartProp.type != "HBar") if(crossBetween == CROSS_BETWEEN_BETWEEN && this.cChartSpace.chart.plotArea.valAx.posX && this.chartProp.type != "HBar")
crossDiff = xPoints[1] ? Math.abs((xPoints[1].pos - xPoints[0].pos) / 2) : Math.abs(xPoints[0].pos - this.chartSpace.chart.plotArea.valAx.posX); crossDiff = xPoints[1] ? Math.abs((xPoints[1].pos - xPoints[0].pos) / 2) : Math.abs(xPoints[0].pos - this.cChartSpace.chart.plotArea.valAx.posX);
for(var i = 0; i < xPoints.length; i++) for(var i = 0; i < xPoints.length; i++)
{ {
...@@ -5975,14 +5984,14 @@ gridChart.prototype = ...@@ -5975,14 +5984,14 @@ gridChart.prototype =
{ {
var pen; var pen;
var path; var path;
var yPoints = this.chartSpace.chart.plotArea.valAx.yPoints ? this.chartSpace.chart.plotArea.valAx.yPoints : this.chartSpace.chart.plotArea.catAx.yPoints; 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++)
{ {
if(this.chartProp.type == "HBar") if(this.chartProp.type == "HBar")
pen = this.chartSpace.chart.plotArea.catAx.compiledMajorGridLines; pen = this.cChartSpace.chart.plotArea.catAx.compiledMajorGridLines;
else else
pen = this.chartSpace.chart.plotArea.valAx.compiledMajorGridLines; pen = this.cChartSpace.chart.plotArea.valAx.compiledMajorGridLines;
path = this.paths.horisontalLines[i]; path = this.paths.horisontalLines[i];
this.cChartDrawer.drawPath(path, pen); this.cChartDrawer.drawPath(path, pen);
...@@ -5994,9 +6003,9 @@ gridChart.prototype = ...@@ -5994,9 +6003,9 @@ gridChart.prototype =
{ {
path = this.paths.horisontalMinorLines[i][n]; path = this.paths.horisontalMinorLines[i][n];
if(this.chartProp.type == "HBar") if(this.chartProp.type == "HBar")
pen = this.chartSpace.chart.plotArea.catAx.compiledMinorGridLines; pen = this.cChartSpace.chart.plotArea.catAx.compiledMinorGridLines;
else else
pen = this.chartSpace.chart.plotArea.valAx.compiledMinorGridLines; pen = this.cChartSpace.chart.plotArea.valAx.compiledMinorGridLines;
this.cChartDrawer.drawPath(path, pen); this.cChartDrawer.drawPath(path, pen);
} }
} }
...@@ -6006,14 +6015,14 @@ gridChart.prototype = ...@@ -6006,14 +6015,14 @@ gridChart.prototype =
_drawVerticalLines: function() _drawVerticalLines: function()
{ {
var pen, path; var pen, path;
var xPoints = this.chartSpace.chart.plotArea.valAx.xPoints ? this.chartSpace.chart.plotArea.valAx.xPoints : this.chartSpace.chart.plotArea.catAx.xPoints; 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++)
{ {
if(this.chartProp.type == "HBar") if(this.chartProp.type == "HBar")
pen = this.chartSpace.chart.plotArea.valAx.compiledMajorGridLines; pen = this.cChartSpace.chart.plotArea.valAx.compiledMajorGridLines;
else else
pen = this.chartSpace.chart.plotArea.catAx.compiledMajorGridLines; pen = this.cChartSpace.chart.plotArea.catAx.compiledMajorGridLines;
path = this.paths.verticalLines[i]; path = this.paths.verticalLines[i];
this.cChartDrawer.drawPath(path, pen); this.cChartDrawer.drawPath(path, pen);
...@@ -6025,9 +6034,9 @@ gridChart.prototype = ...@@ -6025,9 +6034,9 @@ gridChart.prototype =
{ {
path = this.paths.verticalMinorLines[i][n]; path = this.paths.verticalMinorLines[i][n];
if(this.chartProp.type == "HBar") if(this.chartProp.type == "HBar")
pen = this.chartSpace.chart.plotArea.valAx.compiledMinorGridLines; pen = this.cChartSpace.chart.plotArea.valAx.compiledMinorGridLines;
else else
pen = this.chartSpace.chart.plotArea.catAx.compiledMinorGridLines; pen = this.cChartSpace.chart.plotArea.catAx.compiledMinorGridLines;
this.cChartDrawer.drawPath(path, pen); this.cChartDrawer.drawPath(path, pen);
} }
} }
...@@ -6040,8 +6049,7 @@ gridChart.prototype = ...@@ -6040,8 +6049,7 @@ gridChart.prototype =
function catAxisChart() function catAxisChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cShapeDrawer = null; this.cChartSpace = null;
this.chartSpace = null;
this.cChartDrawer = null; this.cChartDrawer = null;
this.paths = {}; this.paths = {};
...@@ -6049,26 +6057,24 @@ function catAxisChart() ...@@ -6049,26 +6057,24 @@ function catAxisChart()
catAxisChart.prototype = catAxisChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer, chartSpace) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.chartSpace = chartSpace; this.cChartDrawer = chartsDrawer;
this.cChartDrawer = chartProp;
this._drawAxis(); this._drawAxis();
this._drawTickMark(); this._drawTickMark();
}, },
reCalculate : function(chartProp, cShapeDrawer, chartSpace) reCalculate : function(chartsDrawer)
{ {
this.chartProp = chartProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.chartSpace = chartSpace; this.cChartDrawer = chartsDrawer;
this.cChartDrawer = chartProp;
this.paths = {}; this.paths = {};
if(this.chartSpace.chart.plotArea.catAx.bDelete != true) if(this.cChartSpace.chart.plotArea.catAx.bDelete != true)
{ {
this._calculateAxis(); this._calculateAxis();
this._calculateTickMark(); this._calculateTickMark();
...@@ -6081,13 +6087,13 @@ catAxisChart.prototype = ...@@ -6081,13 +6087,13 @@ catAxisChart.prototype =
var axisPos; var axisPos;
if(this.chartProp.type == "HBar") if(this.chartProp.type == "HBar")
{ {
axisPos = this.chartSpace.chart.plotArea.catAx.posX; axisPos = this.cChartSpace.chart.plotArea.catAx.posX;
this.paths.axisLine = this._calculateLine( axisPos, this.chartProp.chartGutter._top / this.chartProp.pxToMM, axisPos, (this.chartProp.heightCanvas - this.chartProp.chartGutter._bottom) / this.chartProp.pxToMM); this.paths.axisLine = this._calculateLine( axisPos, this.chartProp.chartGutter._top / this.chartProp.pxToMM, axisPos, (this.chartProp.heightCanvas - this.chartProp.chartGutter._bottom) / this.chartProp.pxToMM);
} }
else else
{ {
//TODO сделать по аналогии с HBAR //TODO сделать по аналогии с HBAR
axisPos = this.chartSpace.chart.plotArea.catAx.posY ? this.chartSpace.chart.plotArea.catAx.posY : this.chartSpace.chart.plotArea.catAx.yPos; axisPos = this.cChartSpace.chart.plotArea.catAx.posY ? this.cChartSpace.chart.plotArea.catAx.posY : this.cChartSpace.chart.plotArea.catAx.yPos;
this.paths.axisLine = this._calculateLine( this.chartProp.chartGutter._left / this.chartProp.pxToMM, axisPos, (this.chartProp.widthCanvas - this.chartProp.chartGutter._right) / this.chartProp.pxToMM, axisPos); this.paths.axisLine = this._calculateLine( this.chartProp.chartGutter._left / this.chartProp.pxToMM, axisPos, (this.chartProp.widthCanvas - this.chartProp.chartGutter._right) / this.chartProp.pxToMM, axisPos);
} }
}, },
...@@ -6097,7 +6103,7 @@ catAxisChart.prototype = ...@@ -6097,7 +6103,7 @@ catAxisChart.prototype =
var widthLine = 0, widthMinorLine = 0; var widthLine = 0, widthMinorLine = 0;
var crossMajorStep = 0, crossMinorStep = 0; var crossMajorStep = 0, crossMinorStep = 0;
switch ( this.chartSpace.chart.plotArea.catAx.majorTickMark ) switch ( this.cChartSpace.chart.plotArea.catAx.majorTickMark )
{ {
case TICK_MARK_CROSS: case TICK_MARK_CROSS:
{ {
...@@ -6122,7 +6128,7 @@ catAxisChart.prototype = ...@@ -6122,7 +6128,7 @@ catAxisChart.prototype =
} }
} }
switch ( this.chartSpace.chart.plotArea.catAx.minorTickMark ) switch ( this.cChartSpace.chart.plotArea.catAx.minorTickMark )
{ {
case TICK_MARK_CROSS: case TICK_MARK_CROSS:
{ {
...@@ -6155,7 +6161,7 @@ catAxisChart.prototype = ...@@ -6155,7 +6161,7 @@ catAxisChart.prototype =
crossMinorStep = - crossMinorStep; crossMinorStep = - crossMinorStep;
} }
var orientation = this.chartSpace && this.chartSpace.chart.plotArea.valAx ? this.chartSpace.chart.plotArea.valAx.scaling.orientation : ORIENTATION_MIN_MAX; var orientation = this.cChartSpace && this.cChartSpace.chart.plotArea.valAx ? this.cChartSpace.chart.plotArea.valAx.scaling.orientation : ORIENTATION_MIN_MAX;
if(orientation !== ORIENTATION_MIN_MAX) if(orientation !== ORIENTATION_MIN_MAX)
{ {
widthMinorLine = - widthMinorLine; widthMinorLine = - widthMinorLine;
...@@ -6181,22 +6187,22 @@ catAxisChart.prototype = ...@@ -6181,22 +6187,22 @@ catAxisChart.prototype =
_calculateVerticalTickMarks: function(widthLine, widthMinorLine, crossMajorStep, crossMinorStep) _calculateVerticalTickMarks: function(widthLine, widthMinorLine, crossMajorStep, crossMinorStep)
{ {
var orientation = this.chartSpace && this.chartSpace.chart.plotArea.catAx ? this.chartSpace.chart.plotArea.catAx.scaling.orientation : ORIENTATION_MIN_MAX; var orientation = this.cChartSpace && this.cChartSpace.chart.plotArea.catAx ? this.cChartSpace.chart.plotArea.catAx.scaling.orientation : ORIENTATION_MIN_MAX;
var yPoints = this.chartSpace.chart.plotArea.catAx.yPoints; var yPoints = this.cChartSpace.chart.plotArea.catAx.yPoints;
var stepY = yPoints[1] ? Math.abs(yPoints[1].pos - yPoints[0].pos) : Math.abs(yPoints[0].pos - this.chartProp.chartGutter._bottom / this.chartProp.pxToMM); var stepY = yPoints[1] ? Math.abs(yPoints[1].pos - yPoints[0].pos) : Math.abs(yPoints[0].pos - this.chartProp.chartGutter._bottom / this.chartProp.pxToMM);
var minorStep = stepY / this.chartProp.numhMinorlines; var minorStep = stepY / this.chartProp.numhMinorlines;
var posX = this.chartSpace.chart.plotArea.catAx.posX ? this.chartSpace.chart.plotArea.catAx.posX : this.chartSpace.chart.plotArea.catAx.xPos; var posX = this.cChartSpace.chart.plotArea.catAx.posX ? this.cChartSpace.chart.plotArea.catAx.posX : this.cChartSpace.chart.plotArea.catAx.xPos;
var posY, posMinorY, k; var posY, posMinorY, k;
//сдвиг, если положение оси - между делениями //сдвиг, если положение оси - между делениями
var firstDiff = 0, posYtemp; var firstDiff = 0, posYtemp;
if(this.chartSpace.chart.plotArea.valAx.crossBetween == CROSS_BETWEEN_BETWEEN) if(this.cChartSpace.chart.plotArea.valAx.crossBetween == CROSS_BETWEEN_BETWEEN)
firstDiff = yPoints[1] ? Math.abs(yPoints[1].pos - yPoints[0].pos) : Math.abs(yPoints[0].pos - this.chartSpace.chart.plotArea.valAx.posY) * 2; firstDiff = yPoints[1] ? Math.abs(yPoints[1].pos - yPoints[0].pos) : Math.abs(yPoints[0].pos - this.cChartSpace.chart.plotArea.valAx.posY) * 2;
var tickMarkSkip = this.chartSpace.chart.plotArea.catAx.tickMarkSkip ? this.chartSpace.chart.plotArea.catAx.tickMarkSkip : 1; var tickMarkSkip = this.cChartSpace.chart.plotArea.catAx.tickMarkSkip ? this.cChartSpace.chart.plotArea.catAx.tickMarkSkip : 1;
if(orientation !== ORIENTATION_MIN_MAX) if(orientation !== ORIENTATION_MIN_MAX)
{ {
...@@ -6247,25 +6253,25 @@ catAxisChart.prototype = ...@@ -6247,25 +6253,25 @@ catAxisChart.prototype =
_calculateHorisontalTickMarks: function(widthLine, widthMinorLine, crossMajorStep, crossMinorStep) _calculateHorisontalTickMarks: function(widthLine, widthMinorLine, crossMajorStep, crossMinorStep)
{ {
var orientation = this.chartSpace && this.chartSpace.chart.plotArea.catAx ? this.chartSpace.chart.plotArea.catAx.scaling.orientation : ORIENTATION_MIN_MAX; var orientation = this.cChartSpace && this.cChartSpace.chart.plotArea.catAx ? this.cChartSpace.chart.plotArea.catAx.scaling.orientation : ORIENTATION_MIN_MAX;
var xPoints = this.chartSpace.chart.plotArea.catAx.xPoints; var xPoints = this.cChartSpace.chart.plotArea.catAx.xPoints;
var stepX = xPoints[1] ? Math.abs(xPoints[1].pos - xPoints[0].pos) : Math.abs(xPoints[0].pos - this.chartSpace.chart.plotArea.catAx.posX) * 2; var stepX = xPoints[1] ? Math.abs(xPoints[1].pos - xPoints[0].pos) : Math.abs(xPoints[0].pos - this.cChartSpace.chart.plotArea.catAx.posX) * 2;
var minorStep = stepX / this.chartProp.numvMinorlines; var minorStep = stepX / this.chartProp.numvMinorlines;
var posY = this.chartSpace.chart.plotArea.catAx.posY ? this.chartSpace.chart.plotArea.catAx.posY : this.chartSpace.chart.plotArea.catAx.yPos; var posY = this.cChartSpace.chart.plotArea.catAx.posY ? this.cChartSpace.chart.plotArea.catAx.posY : this.cChartSpace.chart.plotArea.catAx.yPos;
var posX, posMinorX, k; var posX, posMinorX, k;
var firstDiff = 0, posXtemp; var firstDiff = 0, posXtemp;
if(this.chartSpace.chart.plotArea.valAx.crossBetween == CROSS_BETWEEN_BETWEEN && this.chartProp.type != "Scatter") if(this.cChartSpace.chart.plotArea.valAx.crossBetween == CROSS_BETWEEN_BETWEEN && this.chartProp.type != "Scatter")
{ {
if(xPoints[1]) if(xPoints[1])
firstDiff = Math.abs(xPoints[1].pos - xPoints[0].pos); firstDiff = Math.abs(xPoints[1].pos - xPoints[0].pos);
else if(this.chartSpace.chart.plotArea.valAx.posX) else if(this.cChartSpace.chart.plotArea.valAx.posX)
firstDiff = Math.abs(this.chartSpace.chart.plotArea.valAx.posX - xPoints[0].pos) * 2; firstDiff = Math.abs(this.cChartSpace.chart.plotArea.valAx.posX - xPoints[0].pos) * 2;
} }
var tickMarkSkip = this.chartSpace.chart.plotArea.catAx.tickMarkSkip ? this.chartSpace.chart.plotArea.catAx.tickMarkSkip : 1; var tickMarkSkip = this.cChartSpace.chart.plotArea.catAx.tickMarkSkip ? this.cChartSpace.chart.plotArea.catAx.tickMarkSkip : 1;
if(orientation !== ORIENTATION_MIN_MAX) if(orientation !== ORIENTATION_MIN_MAX)
{ {
...@@ -6338,7 +6344,7 @@ catAxisChart.prototype = ...@@ -6338,7 +6344,7 @@ catAxisChart.prototype =
var pen; var pen;
var path; var path;
pen = this.chartSpace.chart.plotArea.catAx.compiledLn; pen = this.cChartSpace.chart.plotArea.catAx.compiledLn;
path = this.paths.axisLine; path = this.paths.axisLine;
this.cChartDrawer.drawPath(path, pen); this.cChartDrawer.drawPath(path, pen);
...@@ -6351,7 +6357,7 @@ catAxisChart.prototype = ...@@ -6351,7 +6357,7 @@ catAxisChart.prototype =
{ {
for(var i = 0; i < this.paths.tickMarks.length; i++) for(var i = 0; i < this.paths.tickMarks.length; i++)
{ {
pen = this.chartSpace.chart.plotArea.catAx.compiledTickMarkLn; pen = this.cChartSpace.chart.plotArea.catAx.compiledTickMarkLn;
path = this.paths.tickMarks[i]; path = this.paths.tickMarks[i];
this.cChartDrawer.drawPath(path, pen); this.cChartDrawer.drawPath(path, pen);
...@@ -6375,8 +6381,7 @@ catAxisChart.prototype = ...@@ -6375,8 +6381,7 @@ catAxisChart.prototype =
function valAxisChart() function valAxisChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cShapeDrawer = null; this.cChartSpace = null;
this.chartSpace = null;
this.cChartDrawer = null; this.cChartDrawer = null;
this.paths = {}; this.paths = {};
...@@ -6384,26 +6389,24 @@ function valAxisChart() ...@@ -6384,26 +6389,24 @@ function valAxisChart()
valAxisChart.prototype = valAxisChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer, chartSpace) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.chartSpace = chartSpace; this.cChartDrawer = chartsDrawer;
this.cChartDrawer = chartProp;
this._drawAxis(); this._drawAxis();
this._drawTickMark(); this._drawTickMark();
}, },
reCalculate : function(chartProp, cShapeDrawer, chartSpace) reCalculate : function(chartsDrawer)
{ {
this.chartProp = chartProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.chartSpace = chartSpace; this.cChartDrawer = chartsDrawer;
this.cChartDrawer = chartProp;
this.paths = {}; this.paths = {};
if(this.chartSpace.chart.plotArea.valAx.bDelete != true) if(this.cChartSpace.chart.plotArea.valAx.bDelete != true)
{ {
this._calculateAxis(); this._calculateAxis();
this._calculateTickMark(); this._calculateTickMark();
...@@ -6412,11 +6415,11 @@ valAxisChart.prototype = ...@@ -6412,11 +6415,11 @@ valAxisChart.prototype =
_calculateAxis : function() _calculateAxis : function()
{ {
var nullPoisition = this.chartSpace.chart.plotArea.valAx.posX != undefined ? this.chartSpace.chart.plotArea.valAx.posX : this.chartSpace.chart.plotArea.valAx.xPos; var nullPoisition = this.cChartSpace.chart.plotArea.valAx.posX != undefined ? this.cChartSpace.chart.plotArea.valAx.posX : this.cChartSpace.chart.plotArea.valAx.xPos;
if(this.chartProp.type == "HBar") if(this.chartProp.type == "HBar")
{ {
nullPoisition = this.chartSpace.chart.plotArea.valAx.posY; nullPoisition = this.cChartSpace.chart.plotArea.valAx.posY;
this.paths.axisLine = this._calculateLine( this.chartProp.chartGutter._left / this.chartProp.pxToMM, nullPoisition, (this.chartProp.widthCanvas - this.chartProp.chartGutter._right) / this.chartProp.pxToMM, nullPoisition ); this.paths.axisLine = this._calculateLine( this.chartProp.chartGutter._left / this.chartProp.pxToMM, nullPoisition, (this.chartProp.widthCanvas - this.chartProp.chartGutter._right) / this.chartProp.pxToMM, nullPoisition );
} }
else else
...@@ -6430,7 +6433,7 @@ valAxisChart.prototype = ...@@ -6430,7 +6433,7 @@ valAxisChart.prototype =
var widthLine = 0, widthMinorLine = 0; var widthLine = 0, widthMinorLine = 0;
var crossMajorStep = 0; var crossMajorStep = 0;
var crossMinorStep = 0; var crossMinorStep = 0;
switch ( this.chartSpace.chart.plotArea.valAx.majorTickMark ) switch ( this.cChartSpace.chart.plotArea.valAx.majorTickMark )
{ {
case TICK_MARK_CROSS: case TICK_MARK_CROSS:
{ {
...@@ -6455,7 +6458,7 @@ valAxisChart.prototype = ...@@ -6455,7 +6458,7 @@ valAxisChart.prototype =
} }
} }
switch ( this.chartSpace.chart.plotArea.valAx.minorTickMark ) switch ( this.cChartSpace.chart.plotArea.valAx.minorTickMark )
{ {
case TICK_MARK_CROSS: case TICK_MARK_CROSS:
{ {
...@@ -6488,7 +6491,7 @@ valAxisChart.prototype = ...@@ -6488,7 +6491,7 @@ valAxisChart.prototype =
crossMinorStep = - crossMinorStep; crossMinorStep = - crossMinorStep;
} }
var orientation = this.chartSpace && this.chartSpace.chart.plotArea.catAx ? this.chartSpace.chart.plotArea.catAx.scaling.orientation : ORIENTATION_MIN_MAX; var orientation = this.cChartSpace && this.cChartSpace.chart.plotArea.catAx ? this.cChartSpace.chart.plotArea.catAx.scaling.orientation : ORIENTATION_MIN_MAX;
if(orientation !== ORIENTATION_MIN_MAX) if(orientation !== ORIENTATION_MIN_MAX)
{ {
widthMinorLine = - widthMinorLine; widthMinorLine = - widthMinorLine;
...@@ -6501,12 +6504,12 @@ valAxisChart.prototype = ...@@ -6501,12 +6504,12 @@ valAxisChart.prototype =
{ {
if(this.chartProp.type == "HBar") if(this.chartProp.type == "HBar")
{ {
var yPoints = this.chartSpace.chart.plotArea.valAx.xPoints; var yPoints = this.cChartSpace.chart.plotArea.valAx.xPoints;
var stepX = yPoints[1] ? Math.abs(yPoints[1].pos - yPoints[0].pos) : Math.abs(yPoints[1].pos - this.chartProp.chartGutter._bottom / this.chartProp.pxToMM); var stepX = yPoints[1] ? Math.abs(yPoints[1].pos - yPoints[0].pos) : Math.abs(yPoints[1].pos - this.chartProp.chartGutter._bottom / this.chartProp.pxToMM);
var minorStep = stepX / this.chartProp.numvMinorlines; var minorStep = stepX / this.chartProp.numvMinorlines;
var posY = this.chartSpace.chart.plotArea.valAx.posY; var posY = this.cChartSpace.chart.plotArea.valAx.posY;
var posX; var posX;
var posMinorX; var posMinorX;
for(var i = 0; i < yPoints.length; i++) for(var i = 0; i < yPoints.length; i++)
...@@ -6534,12 +6537,12 @@ valAxisChart.prototype = ...@@ -6534,12 +6537,12 @@ valAxisChart.prototype =
} }
else else
{ {
var yPoints = this.chartSpace.chart.plotArea.valAx.yPoints; var yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints;
var stepY = yPoints[1] ? Math.abs(yPoints[1].pos - yPoints[0].pos) : Math.abs(yPoints[0].pos - this.chartProp.chartGutter._bottom / this.chartProp.pxToMM); var stepY = yPoints[1] ? Math.abs(yPoints[1].pos - yPoints[0].pos) : Math.abs(yPoints[0].pos - this.chartProp.chartGutter._bottom / this.chartProp.pxToMM);
var minorStep = stepY / this.chartProp.numhMinorlines; var minorStep = stepY / this.chartProp.numhMinorlines;
var posX = this.chartSpace.chart.plotArea.valAx.posX ? this.chartSpace.chart.plotArea.valAx.posX : this.chartSpace.chart.plotArea.valAx.xPos; var posX = this.cChartSpace.chart.plotArea.valAx.posX ? this.cChartSpace.chart.plotArea.valAx.posX : this.cChartSpace.chart.plotArea.valAx.xPos;
var posY; var posY;
var posMinorY; var posMinorY;
...@@ -6596,7 +6599,7 @@ valAxisChart.prototype = ...@@ -6596,7 +6599,7 @@ valAxisChart.prototype =
var pen; var pen;
var path; var path;
pen = this.chartSpace.chart.plotArea.catAx.compiledLn; pen = this.cChartSpace.chart.plotArea.catAx.compiledLn;
path = this.paths.axisLine; path = this.paths.axisLine;
this.cChartDrawer.drawPath(path, pen); this.cChartDrawer.drawPath(path, pen);
}, },
...@@ -6609,7 +6612,7 @@ valAxisChart.prototype = ...@@ -6609,7 +6612,7 @@ valAxisChart.prototype =
for(var i = 0; i < this.paths.tickMarks.length; i++) for(var i = 0; i < this.paths.tickMarks.length; i++)
{ {
pen = this.chartSpace.chart.plotArea.valAx.compiledTickMarkLn; pen = this.cChartSpace.chart.plotArea.valAx.compiledTickMarkLn;
path = this.paths.tickMarks[i]; path = this.paths.tickMarks[i];
this.cChartDrawer.drawPath(path, pen); this.cChartDrawer.drawPath(path, pen);
...@@ -6632,8 +6635,7 @@ valAxisChart.prototype = ...@@ -6632,8 +6635,7 @@ valAxisChart.prototype =
function allAreaChart() function allAreaChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cShapeDrawer = null; this.cChartSpace = null;
this.chartSpace = null;
this.cChartDrawer = null; this.cChartDrawer = null;
this.paths = null; this.paths = null;
...@@ -6641,21 +6643,20 @@ function allAreaChart() ...@@ -6641,21 +6643,20 @@ function allAreaChart()
allAreaChart.prototype = allAreaChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer, chartSpace) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.chartSpace = chartSpace; this.cChartDrawer = chartsDrawer;
this.cChartDrawer = chartProp;
this._drawArea(); this._drawArea();
}, },
reCalculate: function(chartProp, cShapeDrawer) reCalculate: function(chartsDrawer)
{ {
this.chartProp = chartProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.paths = null; this.paths = null;
this._calculateArea(); this._calculateArea();
...@@ -6688,8 +6689,8 @@ allAreaChart.prototype = ...@@ -6688,8 +6689,8 @@ allAreaChart.prototype =
_drawArea: function() _drawArea: function()
{ {
var pen = this.chartSpace.pen; var pen = this.cChartSpace.pen;
var brush = this.chartSpace.brush; var brush = this.cChartSpace.brush;
this.cChartDrawer.drawPath(this.paths, pen, brush); this.cChartDrawer.drawPath(this.paths, pen, brush);
} }
}; };
...@@ -6698,8 +6699,7 @@ allAreaChart.prototype = ...@@ -6698,8 +6699,7 @@ allAreaChart.prototype =
function areaChart() function areaChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cShapeDrawer = null; this.cChartSpace = null;
this.chartSpace = null;
this.cChartDrawer = null; this.cChartDrawer = null;
this.paths = null; this.paths = null;
...@@ -6707,21 +6707,20 @@ function areaChart() ...@@ -6707,21 +6707,20 @@ function areaChart()
areaChart.prototype = areaChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer, chartSpace) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.chartSpace = chartSpace; this.cChartDrawer = chartsDrawer;
this.cChartDrawer = chartProp;
this._drawArea(); this._drawArea();
}, },
reCalculate: function(chartProp, cShapeDrawer) reCalculate: function(chartsDrawer)
{ {
this.chartProp = chartProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.paths = null; this.paths = null;
this._calculateArea(); this._calculateArea();
...@@ -6762,8 +6761,8 @@ areaChart.prototype = ...@@ -6762,8 +6761,8 @@ areaChart.prototype =
_drawArea: function() _drawArea: function()
{ {
var pen = this.chartSpace.chart.plotArea.pen; var pen = this.cChartSpace.chart.plotArea.pen;
var brush = this.chartSpace.chart.plotArea.brush; var brush = this.cChartSpace.chart.plotArea.brush;
this.cChartDrawer.drawPath(this.paths, pen, brush); this.cChartDrawer.drawPath(this.paths, pen, brush);
} }
}; };
...@@ -6775,28 +6774,28 @@ function drawLine3DChart() ...@@ -6775,28 +6774,28 @@ function drawLine3DChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cChartDrawer = null; this.cChartDrawer = null;
this.cShapeDrawer = null; this.cChartSpace = null;
this.paths = {}; this.paths = {};
} }
drawLine3DChart.prototype = drawLine3DChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.cChartSpace = cShapeDrawer;
this._drawLines(); this._drawLines();
}, },
reCalculate : function(chartProp, cShapeDrawer) reCalculate : function(chartsDrawer)
{ {
this.paths = {}; this.paths = {};
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.cChartSpace = cShapeDrawer;
this._calculateLines(); this._calculateLines();
}, },
...@@ -6835,7 +6834,7 @@ drawLine3DChart.prototype = ...@@ -6835,7 +6834,7 @@ drawLine3DChart.prototype =
var DiffGapDepth = (depthSeria * (gapDepth / 100)) / 2; var DiffGapDepth = (depthSeria * (gapDepth / 100)) / 2;
var depthSeria = (perspectiveDepth / this.chartProp.seriesCount - 2 * DiffGapDepth); var depthSeria = (perspectiveDepth / this.chartProp.seriesCount - 2 * DiffGapDepth);
var view3DProp = this.cShapeDrawer.chart.view3D; var view3DProp = this.cChartSpace.chart.view3D;
var angleOx = view3DProp && view3DProp.rotX ? (- view3DProp.rotX / 360) * (Math.PI * 2) : 0; 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 angleOy = view3DProp && view3DProp.rotY ? (- view3DProp.rotY / 360) * (Math.PI * 2) : 0;
var angleOz = 0; var angleOz = 0;
...@@ -7011,8 +7010,7 @@ function drawBar3DChart() ...@@ -7011,8 +7010,7 @@ function drawBar3DChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cChartDrawer = null; this.cChartDrawer = null;
this.cShapeDrawer = null; this.cChartSpace = null;
this.chartSpace = null;
this.summBarVal = []; this.summBarVal = [];
this.paths = {}; this.paths = {};
...@@ -7020,23 +7018,24 @@ function drawBar3DChart() ...@@ -7020,23 +7018,24 @@ function drawBar3DChart()
drawBar3DChart.prototype = drawBar3DChart.prototype =
{ {
reCalculate : function(chartProp, cShapeDrawer) reCalculate : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.paths = {}; this.paths = {};
this.summBarVal = []; this.summBarVal = [];
this._reCalculateBars(); this._reCalculateBars();
}, },
draw : function(chartProp, cShapeDrawer, chartSpace) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp.calcProp; this.chartProp = chartsDrawer.calcProp;
this.cChartDrawer = chartProp; this.cChartDrawer = chartsDrawer;
this.cShapeDrawer = cShapeDrawer; this.cChartSpace = chartsDrawer.cChartSpace;
this.chartSpace = chartSpace;
this.summBarVal = []; this.summBarVal = [];
this._DrawBars(); this._DrawBars();
...@@ -7164,7 +7163,7 @@ drawBar3DChart.prototype = ...@@ -7164,7 +7163,7 @@ drawBar3DChart.prototype =
//затемнение боковых сторон //затемнение боковых сторон
if(k != 5) if(k != 5)
{ {
var props = this.chartSpace.getParentObjects(); var props = this.cChartSpace.getParentObjects();
var duplicateBrush = brush.createDuplicate(); var duplicateBrush = brush.createDuplicate();
var cColorMod = new CColorMod; var cColorMod = new CColorMod;
cColorMod.val = 20000; cColorMod.val = 20000;
...@@ -7180,17 +7179,17 @@ drawBar3DChart.prototype = ...@@ -7180,17 +7179,17 @@ drawBar3DChart.prototype =
_reCalculateBars: function (/*isSkip*/) _reCalculateBars: function (/*isSkip*/)
{ {
//соответствует подписям оси категорий(OX) //соответствует подписям оси категорий(OX)
var xPoints = this.cShapeDrawer.chart.plotArea.catAx.xPoints; var xPoints = this.cChartSpace.chart.plotArea.catAx.xPoints;
//соответствует подписям оси значений(OY) //соответствует подписям оси значений(OY)
var yPoints = this.cShapeDrawer.chart.plotArea.valAx.yPoints; var yPoints = this.cChartSpace.chart.plotArea.valAx.yPoints;
var widthGraph = this.chartProp.widthCanvas - this.chartProp.chartGutter._left - this.chartProp.chartGutter._right; var widthGraph = this.chartProp.widthCanvas - this.chartProp.chartGutter._left - this.chartProp.chartGutter._right;
var defaultOverlap = (this.chartProp.subType == "stacked" || this.chartProp.subType == "stackedPer") ? 100 : 0; var defaultOverlap = (this.chartProp.subType == "stacked" || this.chartProp.subType == "stackedPer") ? 100 : 0;
var overlap = this.cShapeDrawer.chart.plotArea.chart.overlap ? this.cShapeDrawer.chart.plotArea.chart.overlap : defaultOverlap; var overlap = this.cChartSpace.chart.plotArea.chart.overlap ? this.cChartSpace.chart.plotArea.chart.overlap : defaultOverlap;
var width = widthGraph / this.chartProp.ptCount; var width = widthGraph / this.chartProp.ptCount;
var gapWidth = this.cShapeDrawer.chart.plotArea.chart.gapWidth != null ? this.cShapeDrawer.chart.plotArea.chart.gapWidth : 150; var gapWidth = this.cChartSpace.chart.plotArea.chart.gapWidth != null ? this.cChartSpace.chart.plotArea.chart.gapWidth : 150;
var individualBarWidth = width / (this.chartProp.seriesCount - (this.chartProp.seriesCount - 1) * (overlap / 100) + gapWidth / 100); var individualBarWidth = width / (this.chartProp.seriesCount - (this.chartProp.seriesCount - 1) * (overlap / 100) + gapWidth / 100);
...@@ -7219,11 +7218,11 @@ drawBar3DChart.prototype = ...@@ -7219,11 +7218,11 @@ drawBar3DChart.prototype =
var perspectiveDepth = this.chartProp.depthPerspective; var perspectiveDepth = this.chartProp.depthPerspective;
//сдвиг по OZ в глубину //сдвиг по OZ в глубину
var gapDepth = this.cShapeDrawer.chart.plotArea.chart.gapDepth != null ? this.cShapeDrawer.chart.plotArea.chart.gapDepth : globalGapDepth; var gapDepth = this.cChartSpace.chart.plotArea.chart.gapDepth != null ? this.cChartSpace.chart.plotArea.chart.gapDepth : globalGapDepth;
perspectiveDepth = perspectiveDepth / (gapDepth / 100 + 1); perspectiveDepth = perspectiveDepth / (gapDepth / 100 + 1);
var DiffGapDepth = perspectiveDepth * (gapDepth / 2) / 100; var DiffGapDepth = perspectiveDepth * (gapDepth / 2) / 100;
var view3DProp = this.cShapeDrawer.chart.view3D; var view3DProp = this.cChartSpace.chart.view3D;
var angleOx = view3DProp && view3DProp.rotX ? (- view3DProp.rotX / 360) * (Math.PI * 2) : 0; 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 angleOy = view3DProp && view3DProp.rotY ? (- view3DProp.rotY / 360) * (Math.PI * 2) : 0;
var angleOz = 0; var angleOz = 0;
...@@ -7247,7 +7246,7 @@ drawBar3DChart.prototype = ...@@ -7247,7 +7246,7 @@ drawBar3DChart.prototype =
if(j != 0) if(j != 0)
startXPosition = xPoints[j].pos - (xPoints[j].pos - xPoints[j - 1].pos) / 2; startXPosition = xPoints[j].pos - (xPoints[j].pos - xPoints[j - 1].pos) / 2;
else else
startXPosition = this.cShapeDrawer.chart.plotArea.valAx.posX; startXPosition = this.cChartSpace.chart.plotArea.valAx.posX;
if(i == 0) if(i == 0)
startX = startXPosition * this.chartProp.pxToMM + hmargin + i * (individualBarWidth); startX = startXPosition * this.chartProp.pxToMM + hmargin + i * (individualBarWidth);
else else
...@@ -7499,30 +7498,28 @@ drawBar3DChart.prototype = ...@@ -7499,30 +7498,28 @@ drawBar3DChart.prototype =
function grid3DChart() function grid3DChart()
{ {
this.chartProp = null; this.chartProp = null;
this.cShapeDrawer = null; this.cChartDrawer = null;
this.chartSpace = null; this.cChartSpace = null;
this.paths = {}; this.paths = {};
} }
grid3DChart.prototype = grid3DChart.prototype =
{ {
draw : function(chartProp, cShapeDrawer, chartSpace) draw : function(chartsDrawer)
{ {
this.chartProp = chartProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartDrawer = chartsDrawer;
this.cChartDrawer = chartProp; this.cChartSpace = chartsDrawer.cChartSpace;
this.chartSpace = chartSpace;
this._drawHorisontalLines(); this._drawHorisontalLines();
this._drawVerticalLines(); this._drawVerticalLines();
}, },
reCalculate : function(chartProp, cShapeDrawer, chartSpace) reCalculate : function(chartsDrawer)
{ {
this.chartProp = chartProp; this.chartProp = chartsDrawer.calcProp;
this.cShapeDrawer = cShapeDrawer; this.cChartDrawer = chartsDrawer;
this.chartSpace = chartSpace; this.cChartSpace = chartsDrawer.cChartSpace;
this.cChartDrawer = cShapeDrawer;
this.paths = {}; this.paths = {};
this._calculateHorisontalLines(); this._calculateHorisontalLines();
...@@ -7539,9 +7536,9 @@ grid3DChart.prototype = ...@@ -7539,9 +7536,9 @@ grid3DChart.prototype =
var width = widthGraph / this.chartProp.ptCount; var width = widthGraph / this.chartProp.ptCount;
var defaultOverlap = (this.chartProp.subType == "stacked" || this.chartProp.subType == "stackedPer") ? 100 : 0; var defaultOverlap = (this.chartProp.subType == "stacked" || this.chartProp.subType == "stackedPer") ? 100 : 0;
var overlap = this.chartSpace.chart.plotArea.chart.overlap ? this.chartSpace.chart.plotArea.chart.overlap : defaultOverlap; var overlap = this.cChartSpace.chart.plotArea.chart.overlap ? this.cChartSpace.chart.plotArea.chart.overlap : defaultOverlap;
var gapWidth = this.chartSpace.chart.plotArea.chart.gapWidth ? this.chartSpace.chart.plotArea.chart.gapWidth : 150; var gapWidth = this.cChartSpace.chart.plotArea.chart.gapWidth ? this.cChartSpace.chart.plotArea.chart.gapWidth : 150;
var firstX = this.chartProp.chartGutter._left; var firstX = this.chartProp.chartGutter._left;
var firstY; var firstY;
...@@ -7552,7 +7549,7 @@ grid3DChart.prototype = ...@@ -7552,7 +7549,7 @@ grid3DChart.prototype =
var rPerspective = this.chartProp.rPerspective; var rPerspective = this.chartProp.rPerspective;
var perspectiveDepth = this.chartProp.depthPerspective; var perspectiveDepth = this.chartProp.depthPerspective;
var view3DProp = this.chartSpace.chart.view3D; var view3DProp = this.cChartSpace.chart.view3D;
var angleOx = view3DProp && view3DProp.rotX ? (- view3DProp.rotX / 360) * (Math.PI * 2) : 0; 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 angleOy = view3DProp && view3DProp.rotY ? (- view3DProp.rotY / 360) * (Math.PI * 2) : 0;
var angleOz = 0; var angleOz = 0;
...@@ -7608,7 +7605,7 @@ grid3DChart.prototype = ...@@ -7608,7 +7605,7 @@ grid3DChart.prototype =
var rPerspective = this.chartProp.rPerspective; var rPerspective = this.chartProp.rPerspective;
var perspectiveDepth = this.chartProp.depthPerspective; var perspectiveDepth = this.chartProp.depthPerspective;
var view3DProp = this.chartSpace.chart.view3D; var view3DProp = this.cChartSpace.chart.view3D;
var angleOx = view3DProp && view3DProp.rotX ? (- view3DProp.rotX / 360) * (Math.PI * 2) : 0; 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 angleOy = view3DProp && view3DProp.rotY ? (- view3DProp.rotY / 360) * (Math.PI * 2) : 0;
var angleOz = 0; var angleOz = 0;
...@@ -7684,9 +7681,9 @@ grid3DChart.prototype = ...@@ -7684,9 +7681,9 @@ grid3DChart.prototype =
for(var i = 0; i < this.paths.horisontalLines.length; i++) for(var i = 0; i < this.paths.horisontalLines.length; i++)
{ {
if(this.chartProp.type == "HBar") if(this.chartProp.type == "HBar")
pen = this.chartSpace.chart.plotArea.catAx.compiledMajorGridLines; pen = this.cChartSpace.chart.plotArea.catAx.compiledMajorGridLines;
else else
pen = this.chartSpace.chart.plotArea.valAx.compiledMajorGridLines; pen = this.cChartSpace.chart.plotArea.valAx.compiledMajorGridLines;
path = this.paths.horisontalLines[i]; path = this.paths.horisontalLines[i];
this.cChartDrawer.drawPath(path, pen); this.cChartDrawer.drawPath(path, pen);
...@@ -7703,9 +7700,9 @@ grid3DChart.prototype = ...@@ -7703,9 +7700,9 @@ grid3DChart.prototype =
for(var i = 0; i < this.paths.verticalLines.length; i++) for(var i = 0; i < this.paths.verticalLines.length; i++)
{ {
if(this.chartProp.type == "HBar") if(this.chartProp.type == "HBar")
pen = this.chartSpace.chart.plotArea.valAx.compiledMajorGridLines; pen = this.cChartSpace.chart.plotArea.valAx.compiledMajorGridLines;
else else
pen = this.chartSpace.chart.plotArea.catAx.compiledMajorGridLines; pen = this.cChartSpace.chart.plotArea.catAx.compiledMajorGridLines;
path = this.paths.verticalLines[i]; path = this.paths.verticalLines[i];
this.cChartDrawer.drawPath(path, pen); this.cChartDrawer.drawPath(path, pen);
......
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