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
ec170283
Commit
ec170283
authored
Dec 05, 2016
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drawing inside pie area
parent
dde95331
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+9
-8
No files found.
common/Charts/ChartsDrawer.js
View file @
ec170283
...
...
@@ -9154,22 +9154,23 @@ drawPieChart.prototype =
return
res
;
};
var
calculateInsideFaces
=
function
(
startAng
,
swapAng
)
var
calculateInsideFaces
=
function
(
startAng
1
,
swapAng1
,
startAng2
,
swapAng2
)
{
var
path
=
getNewPath
();
var
endAng
=
startAng
+
swapAng
;
var
p
=
getSegmentPoints
(
startAng
,
endAng
);
var
endAng1
=
startAng1
+
swapAng1
;
var
endAng2
=
startAng2
+
swapAng2
;
var
p
=
getSegmentPoints
(
startAng1
,
endAng1
,
startAng2
,
endAng2
);
path
.
moveTo
(
xCenter
/
pxToMm
*
pathW
,
yCenter
/
pxToMm
*
pathH
);
path
.
moveTo
(
pointCenter1
.
x
/
pxToMm
*
pathW
,
pointCenter1
.
y
/
pxToMm
*
pathH
);
path
.
lnTo
(
p
.
x0
/
pxToMm
*
pathW
,
p
.
y0
/
pxToMm
*
pathH
);
path
.
lnTo
(
p
.
x1
/
pxToMm
*
pathW
,
p
.
y1
/
pxToMm
*
pathH
);
path
.
lnTo
(
xCenter
/
pxToMm
*
pathW
,
(
yCenter
+
depth
)
/
pxToMm
*
pathH
);
path
.
lnTo
(
pointCenter2
.
x
/
pxToMm
*
pathW
,
(
pointCenter2
.
y
)
/
pxToMm
*
pathH
);
path
.
moveTo
(
xCenter
/
pxToMm
*
pathW
,
yCenter
/
pxToMm
*
pathH
);
path
.
moveTo
(
pointCenter1
.
x
/
pxToMm
*
pathW
,
pointCenter1
.
y
/
pxToMm
*
pathH
);
path
.
lnTo
(
p
.
x2
/
pxToMm
*
pathW
,
p
.
y2
/
pxToMm
*
pathH
);
path
.
lnTo
(
p
.
x3
/
pxToMm
*
pathW
,
p
.
y3
/
pxToMm
*
pathH
);
path
.
lnTo
(
xCenter
/
pxToMm
*
pathW
,
(
yCenter
+
depth
)
/
pxToMm
*
pathH
);
path
.
lnTo
(
pointCenter2
.
x
/
pxToMm
*
pathW
,
(
pointCenter2
.
y
)
/
pxToMm
*
pathH
);
path
.
recalculate
(
gdLst
);
...
...
@@ -9268,7 +9269,7 @@ drawPieChart.prototype =
//INSIDE FACES
var
insidePath
=
null
;
//var insidePath = calculateInsideFaces(stAng, swAng
);
var
insidePath
=
calculateInsideFaces
(
startAngle1
,
swapAngle1
,
startAngle2
,
swapAngle2
);
//UP FACE
var
upPath
=
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