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
0eb2903d
Commit
0eb2903d
authored
Dec 08, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for perspective pie drawing
parent
56942dc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+7
-7
No files found.
common/Charts/ChartsDrawer.js
View file @
0eb2903d
...
...
@@ -8445,8 +8445,8 @@ drawPieChart.prototype =
var
radius21
=
Math
.
abs
((
test22
.
x
-
test11
.
x
)
/
2
);
var
radius22
=
Math
.
abs
((
point5
.
y
-
point1
.
y
)
/
2
);
var
center1
=
{
x
:
this
.
chartProp
.
chartGutter
.
_left
+
trueWidth
/
2
,
y
:
-
(
point6
.
y
-
point2
.
y
)
/
2
+
point6
.
y
};
var
center2
=
{
x
:
this
.
chartProp
.
chartGutter
.
_left
+
trueWidth
/
2
,
y
:
-
(
point5
.
y
-
point1
.
y
)
/
2
+
point5
.
y
};
var
center1
=
{
x
:
this
.
chartProp
.
chartGutter
.
_left
+
trueWidth
/
2
,
y
:
(
point2
.
y
-
point6
.
y
)
/
2
+
point6
.
y
};
var
center2
=
{
x
:
this
.
chartProp
.
chartGutter
.
_left
+
trueWidth
/
2
,
y
:
(
point1
.
y
-
point5
.
y
)
/
2
+
point5
.
y
};
var
angles1
=
this
.
_calculateAngles3DPerspective
(
center1
.
x
,
center1
.
y
,
radius11
,
radius12
,
radius3D1
,
center3D1
);
var
angles2
=
this
.
_calculateAngles3DPerspective
(
center2
.
x
,
center2
.
y
,
radius21
,
radius22
,
radius3D2
,
center3D2
);
...
...
@@ -8472,7 +8472,7 @@ drawPieChart.prototype =
angles2
[
i
].
swap
=
end1
-
start1
;
}
var
paths
=
this
.
_calculateSegment3DPerspective
(
radius11
,
radius12
,
radius21
,
radius22
,
angles1
[
i
],
angles2
[
i
],
center1
,
center2
,
pointCenter1
,
pointCenter2
);
var
paths
=
this
.
_calculateSegment3DPerspective
(
radius11
,
radius12
,
radius21
,
radius22
,
angles1
[
i
],
angles2
[
i
],
center1
,
center2
,
pointCenter1
,
pointCenter2
,
Math
.
sign
(
point2
.
y
-
point6
.
y
)
);
if
(
!
this
.
paths
.
series
[
angles1
.
length
-
i
-
1
])
{
...
...
@@ -8851,7 +8851,7 @@ drawPieChart.prototype =
return
path
;
},
_calculateSegment3DPerspective
:
function
(
radiusUp1
,
radiusUp2
,
radiusDown1
,
radiusDown2
,
angles1
,
angles2
,
center1
,
center2
,
pointCenter1
,
pointCenter2
)
_calculateSegment3DPerspective
:
function
(
radiusUp1
,
radiusUp2
,
radiusDown1
,
radiusDown2
,
angles1
,
angles2
,
center1
,
center2
,
pointCenter1
,
pointCenter2
,
upFaceSign
)
{
var
xCenter
=
center1
.
x
,
yCenter
=
center1
.
y
,
xCenter1
=
center2
.
x
,
yCenter1
=
center2
.
y
;
var
startAngle1
=
angles1
.
start
,
swapAngle1
=
angles1
.
swap
,
startAngle2
=
angles2
.
start
,
swapAngle2
=
angles2
.
swap
;
...
...
@@ -9043,17 +9043,17 @@ drawPieChart.prototype =
if
((
start
>=
0
&&
start
>=
Math
.
PI
&&
start
<=
2
*
Math
.
PI
)
||
(
start
<
0
&&
start
>=
-
Math
.
PI
&&
start
<=
0
))
{
frontPath
.
push
(
calculateFrontFace
(
start
,
swap
,
start2
,
swap2
));
frontPath
.
push
(
calculateFrontFace
(
upFaceSign
*
start
,
upFaceSign
*
swap
,
start2
,
swap2
));
}
}
//INSIDE FACES
var
insidePath
=
null
;
insidePath
=
calculateInsideFaces
(
startAngle1
,
swapAngle1
,
startAngle2
,
swapAngle2
);
insidePath
=
calculateInsideFaces
(
upFaceSign
*
startAngle1
,
upFaceSign
*
swapAngle1
,
startAngle2
,
swapAngle2
);
//UP FACE
var
upPath
=
null
;
upPath
=
calculateUpFace
(
startAngle1
,
swapAngle1
);
upPath
=
calculateUpFace
(
upFaceSign
*
startAngle1
,
upFaceSign
*
swapAngle1
);
//DOWN FACE
var
downPath
=
null
;
...
...
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