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
1a933821
Commit
1a933821
authored
Mar 22, 2016
by
GoshaZotov
Committed by
Alexander.Trofimov
May 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
изменен порядок отрисовки данных 3d диаграмм(3d hbar chart)
parent
9204f2f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
2 deletions
+80
-2
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+80
-2
No files found.
common/Charts/ChartsDrawer.js
View file @
1a933821
...
...
@@ -2566,6 +2566,8 @@ drawBarChart.prototype =
this
.
paths
=
{};
this
.
summBarVal
=
[];
this
.
sortZIndexPaths
=
[];
this
.
_reCalculateBars
();
},
...
...
@@ -5712,6 +5714,7 @@ function drawHBarChart()
this
.
cChartDrawer
=
null
;
this
.
cShapeDrawer
=
null
;
this
.
paths
=
{};
this
.
sortZIndexPaths
=
[];
this
.
summBarVal
=
[];
}
...
...
@@ -5725,6 +5728,8 @@ drawHBarChart.prototype =
this
.
paths
=
{};
this
.
summBarVal
=
[];
this
.
sortZIndexPaths
=
[];
this
.
chartProp
=
chartsDrawer
.
calcProp
;
this
.
cChartDrawer
=
chartsDrawer
;
this
.
cChartSpace
=
chartsDrawer
.
cChartSpace
;
...
...
@@ -5887,6 +5892,8 @@ drawHBarChart.prototype =
point8
=
this
.
cChartDrawer
.
_convertAndTurnPoint
(
x8
,
y8
,
z8
);
paths
=
this
.
cChartDrawer
.
calculateRect3D
(
point1
,
point2
,
point3
,
point4
,
point5
,
point6
,
point7
,
point8
,
val
);
this
.
sortZIndexPaths
.
push
({
seria
:
i
,
point
:
idx
,
paths
:
paths
,
x
:
point1
.
x
,
y
:
point1
.
y
,
zIndex
:
point1
.
z
});
}
else
{
...
...
@@ -5906,6 +5913,17 @@ drawHBarChart.prototype =
if
(
seria
.
length
)
seriesCounter
++
;
}
if
(
this
.
cChartDrawer
.
nDimensionCount
===
3
)
{
this
.
sortZIndexPaths
.
sort
(
function
sortArr
(
a
,
b
)
{
if
(
b
.
zIndex
==
a
.
zIndex
)
return
b
.
y
-
a
.
y
;
else
return
b
.
zIndex
-
a
.
zIndex
;
});
}
},
_getOptionsForDrawing
:
function
(
ser
,
point
,
onlyLessNull
)
...
...
@@ -6179,8 +6197,9 @@ drawHBarChart.prototype =
return
path
;
},
_DrawBars3D
:
function
()
//TODO delete after test
_DrawBars3D2
:
function
()
{
var
t
=
this
;
var
draw
=
function
(
onlyLessNull
)
...
...
@@ -6260,6 +6279,65 @@ drawHBarChart.prototype =
}
},
_DrawBars3D
:
function
()
{
var
t
=
this
;
var
processor3D
=
this
.
cChartDrawer
.
processor3D
;
var
verges
=
{
front
:
0
,
down
:
1
,
left
:
2
,
right
:
3
,
up
:
4
,
unfront
:
5
};
var
drawVerges
=
function
(
i
,
j
,
paths
,
onlyLessNull
,
start
,
stop
)
{
var
brush
,
pen
,
options
;
options
=
t
.
_getOptionsForDrawing
(
i
,
j
,
onlyLessNull
);
if
(
options
!==
null
)
{
pen
=
options
.
pen
;
brush
=
options
.
brush
;
for
(
var
k
=
start
;
k
<=
stop
;
k
++
)
{
t
.
_drawBar3D
(
paths
[
k
],
pen
,
brush
,
k
);
}
}
};
var
draw
=
function
(
onlyLessNull
,
start
,
stop
)
{
for
(
var
i
=
0
;
i
<
t
.
sortZIndexPaths
.
length
;
i
++
)
{
drawVerges
(
t
.
sortZIndexPaths
[
i
].
seria
,
t
.
sortZIndexPaths
[
i
].
point
,
t
.
sortZIndexPaths
[
i
].
paths
,
onlyLessNull
,
start
,
stop
);
}
};
if
(
this
.
chartProp
.
subType
===
"
standard
"
)
{
draw
(
true
,
verges
.
front
,
verges
.
unfront
);
draw
(
false
,
verges
.
front
,
verges
.
unfront
);
}
else
{
draw
(
true
,
verges
.
down
,
verges
.
up
);
draw
(
false
,
verges
.
down
,
verges
.
up
);
draw
(
true
,
verges
.
unfront
,
verges
.
unfront
);
draw
(
false
,
verges
.
unfront
,
verges
.
unfront
);
draw
(
true
,
verges
.
front
,
verges
.
front
);
draw
(
false
,
verges
.
front
,
verges
.
front
);
}
},
_drawBar3D
:
function
(
path
,
pen
,
brush
,
k
)
{
//затемнение боковых сторон
...
...
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