Commit d74d0b26 authored by GoshaZotov's avatar GoshaZotov

for stacked hbar charts

parent e5f0f890
...@@ -6914,6 +6914,7 @@ drawHBarChart.prototype = ...@@ -6914,6 +6914,7 @@ drawHBarChart.prototype =
{ {
this.temp[cubeCount].faces = []; this.temp[cubeCount].faces = [];
this.temp[cubeCount].arrPoints = [point11, point22, point33, point44, point55, point66, point77, point88]; this.temp[cubeCount].arrPoints = [point11, point22, point33, point44, point55, point66, point77, point88];
this.temp[cubeCount].z = point11.z;
} }
for(var k = 0; k < paths.length; k++) for(var k = 0; k < paths.length; k++)
...@@ -11956,42 +11957,24 @@ CSortFaces.prototype = ...@@ -11956,42 +11957,24 @@ CSortFaces.prototype =
if(startIndexes.length === 0) if(startIndexes.length === 0)
{ {
var maxIndexes = 1; //TODO сделано для графиков типа stacked, когда пересечения найдены всех параллалеп.
var mapIndexes = {}; var minZ = parallelepipeds[0].z;
for(var i = 0; i < countIntersection.length; i++) var minZArray = [];
for(var i = 0; i < parallelepipeds.length; i++)
{ {
if(countIntersection[i] === maxIndexes) if(parallelepipeds[i].z < minZ)
{ {
startIndexes.push({index: parseInt(i)}); minZ = parallelepipeds[i].z;
mapIndexes[parseInt(i)] = 1; minZArray = [];
}
}
//для stacked заглушка. пересмотреть!!!
var arr = [];
for(var i = 0; i < startIndexes.length; i++)
{
var index = startIndexes[i].index;
var temp = false;
for(var j in revIntersections[index])
{
if(mapIndexes[j])
{
temp = true;
break;
}
} }
if(temp) if(minZ === parallelepipeds[i].z)
{ {
arr.push({index: parseInt(index)}); minZArray.push({index: parseInt(i)});
} }
} }
if(arr.length) startIndexes = minZArray.reverse();
{
startIndexes = arr;
}
} }
var g = revIntersections; var g = revIntersections;
......
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