Commit 71eda031 authored by GoshaZotov's avatar GoshaZotov

change drawing for nPerspective hbar charts

parent 9d18b2d0
......@@ -6478,11 +6478,22 @@ drawHBarChart.prototype =
if(this.cChartDrawer.nDimensionCount === 3)
{
console.time("asd");
if(this.cChartDrawer.processor3D.view3D.rAngAx)
{
this.sortZIndexPaths.sort (function sortArr(a, b)
{
if(b.zIndex == a.zIndex)
return a.x - b.x;
else
return b.zIndex - a.zIndex;
});
}
else
{
var cSortFaces = new CSortFaces(this.cChartDrawer);
//this.sortZIndexPaths = cSortFaces.sortFaces(this.sortZIndexPaths);
this.sortParallelepipeds = cSortFaces.sortParallelepipeds(this.temp, this.sortZIndexPaths);
console.timeEnd("asd");
}
}
},
......@@ -6840,6 +6851,24 @@ drawHBarChart.prototype =
paths = this.cChartDrawer.calculateRect3D(point1, point2, point3, point4, point5, point6, point7, point8, val);
if(this.cChartDrawer.processor3D.view3D.rAngAx)
{
var controlPoint1 = this.cChartDrawer._convertAndTurnPoint(x5 + width / 2, y5 - individualBarHeight / 2, z5);
var controlPoint2 = this.cChartDrawer._convertAndTurnPoint(x5 + width / 2, y5, z5 + perspectiveDepth / 2);
var controlPoint3 = this.cChartDrawer._convertAndTurnPoint(x5, y5 - individualBarHeight / 2, z5 + perspectiveDepth / 2);
var controlPoint4 = this.cChartDrawer._convertAndTurnPoint(x8, y8 - individualBarHeight / 2, z8 + perspectiveDepth / 2);
var controlPoint5 = this.cChartDrawer._convertAndTurnPoint(x1 + width / 2 , y1, z1 + perspectiveDepth / 2);
var controlPoint6 = this.cChartDrawer._convertAndTurnPoint(x6 + width / 2 , y6 - individualBarHeight / 2, z6);
var sortPaths = [controlPoint1, controlPoint2, controlPoint3, controlPoint4, controlPoint5, controlPoint6];
for(var k = 0; k < paths.length; k++)
{
this.sortZIndexPaths.push({seria: i, point: idx, verge: k, paths: paths[k], x: sortPaths[k].x, y: sortPaths[k].y, zIndex: sortPaths[k].z});
}
}
else
{
//рассчитываем 8 точек для каждого столбца одинакового размера для рассчета положения столбцов
if(this.chartProp.subType === "normal")
{
......@@ -6898,6 +6927,7 @@ drawHBarChart.prototype =
var plainArea = this.cChartDrawer.getAreaQuadrilateral(arrPoints[k][0], arrPoints[k][1], arrPoints[k][2], arrPoints[k][3]);
this.temp[cubeCount].faces.push({seria: i, point: idx, verge: k, paths: paths[k], points: arrPoints2[k], points2: arrPoints[k], plainEquation: plainEquation, plainArea: plainArea});
}
}
return paths;
},
......@@ -7097,6 +7127,15 @@ drawHBarChart.prototype =
}
};
if(this.cChartDrawer.processor3D.view3D.rAngAx)
{
for(var i = 0; i < this.sortZIndexPaths.length; i++)
{
drawVerges(this.sortZIndexPaths[i].seria, this.sortZIndexPaths[i].point, this.sortZIndexPaths[i].paths, null, this.sortZIndexPaths[i].verge);
}
}
else
{
for(var i = 0; i < this.sortParallelepipeds.length; i++)
{
var index = this.sortParallelepipeds[i].nextIndex;
......@@ -7107,6 +7146,7 @@ drawHBarChart.prototype =
drawVerges(face.seria, face.point, face.paths, null, face.verge);
}
}
}
},
_drawBar3D: function(path, pen, brush, k)
......
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