Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
e5f0f890
Commit
e5f0f890
authored
Sep 06, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for stacked hbar charts
parent
a3bfbde4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
11 deletions
+54
-11
common/Charts/3DTransformation.js
common/Charts/3DTransformation.js
+2
-2
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+52
-9
No files found.
common/Charts/3DTransformation.js
View file @
e5f0f890
...
...
@@ -113,7 +113,7 @@ Processor3D.prototype.calaculate3DProperties = function(baseDepth, gapDepth, bIs
{
this
.
_calculateCameraDiff
();
if
(
this
.
view3D
.
rAngAx
||
(
!
this
.
view3D
.
rAngAx
&&
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
HBar
&&
null
!==
this
.
view3D
.
hPercent
)
)
if
(
this
.
view3D
.
rAngAx
)
{
this
.
_recalculateScaleWithMaxWidth
();
}
...
...
@@ -134,7 +134,7 @@ Processor3D.prototype._calculateAutoHPercent = function()
if
(
this
.
hPercent
==
null
)
{
this
.
hPercent
=
this
.
view3D
.
hPercent
===
null
?
(
heightLine
/
widthLine
)
:
this
.
view3D
.
hPercent
/
100
;
if
(
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
HBar
&&
this
.
view3D
.
hPercent
===
null
&&
this
.
view3D
.
rAngAx
)
if
(
this
.
chartsDrawer
.
calcProp
.
type
===
AscFormat
.
c_oChartTypes
.
HBar
&&
((
this
.
view3D
.
hPercent
===
null
&&
this
.
view3D
.
rAngAx
)
||
(
this
.
view3D
.
hPercent
!==
null
&&
!
this
.
view3D
.
rAngAx
))
)
this
.
hPercent
=
1
/
this
.
hPercent
;
}
};
...
...
common/Charts/ChartsDrawer.js
View file @
e5f0f890
...
...
@@ -11943,14 +11943,54 @@ CSortFaces.prototype =
var
intersectionsParallelepipeds
=
this
.
_getIntersectionsParallelepipeds
(
parallelepipeds
);
var
intersections
=
intersectionsParallelepipeds
.
intersections
;
var
revIntersections
=
intersectionsParallelepipeds
.
reverseIntersections
;
var
countIntersection
=
intersectionsParallelepipeds
.
countIntersection
;
var
startIndexs
=
[];
var
test
=
[];
for
(
var
i
=
0
;
i
<
parallelepipeds
.
length
;
i
++
)
var
startIndexes
=
[];
for
(
var
i
=
0
;
i
<
countIntersection
.
length
;
i
++
)
{
if
(
countIntersection
[
i
]
===
0
)
{
startIndexes
.
push
({
index
:
parseInt
(
i
)});
}
}
if
(
startIndexes
.
length
===
0
)
{
if
(
intersections
[
i
]
===
undefined
)
var
maxIndexes
=
1
;
var
mapIndexes
=
{};
for
(
var
i
=
0
;
i
<
countIntersection
.
length
;
i
++
)
{
if
(
countIntersection
[
i
]
===
maxIndexes
)
{
startIndexes
.
push
({
index
:
parseInt
(
i
)});
mapIndexes
[
parseInt
(
i
)]
=
1
;
}
}
//для 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
)
{
arr
.
push
({
index
:
parseInt
(
index
)});
}
}
if
(
arr
.
length
)
{
startIndex
s
.
push
({
index
:
parseInt
(
i
)})
;
startIndex
es
=
arr
;
}
}
...
...
@@ -11990,10 +12030,9 @@ CSortFaces.prototype =
return
res
;
};
for
(
var
i
=
0
;
i
<
startIndexs
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
startIndexes
.
length
;
i
++
)
{
dfs
(
startIndexs
[
i
].
index
);
dfs
(
startIndex
e
s
[
i
].
index
);
}
var
addIndexes
=
{};
...
...
@@ -12022,11 +12061,13 @@ CSortFaces.prototype =
var
intersections
=
[];
var
reverseIntersections
=
[];
var
countIntersection
=
[];
console
.
time
(
"
_getIntersectionsParallelepipeds
"
);
for
(
var
i
=
0
;
i
<
parallelepipeds
.
length
;
i
++
)
{
//из каждой точки данного параллалепипеда строим прямые до точки наблюдателя
var
fromParallalepiped
=
parallelepipeds
[
i
];
countIntersection
[
i
]
=
0
;
for
(
var
m
=
0
;
m
<
parallelepipeds
.
length
;
m
++
)
{
...
...
@@ -12065,6 +12106,8 @@ CSortFaces.prototype =
reverseIntersections
[
m
]
=
[];
}
countIntersection
[
i
]
++
;
intersections
[
i
][
m
]
=
1
;
reverseIntersections
[
m
][
i
]
=
1
;
...
...
@@ -12079,7 +12122,7 @@ CSortFaces.prototype =
}
console
.
timeEnd
(
"
_getIntersectionsParallelepipeds
"
);
return
{
intersections
:
intersections
,
reverseIntersections
:
reverseIntersections
};
return
{
intersections
:
intersections
,
reverseIntersections
:
reverseIntersections
,
countIntersection
:
countIntersection
};
},
sortFaces
:
function
(
faces
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment