Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
F
flot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HS-public
flot
Commits
e491dc7a
Commit
e491dc7a
authored
Feb 09, 2013
by
David Schnur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache the data value, since it is used repeatedly.
parent
d3a6bc96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
jquery.flot.pie.js
jquery.flot.pie.js
+7
-5
No files found.
jquery.flot.pie.js
View file @
e491dc7a
...
@@ -232,19 +232,21 @@ More detail and specific examples can be found in the included HTML file.
...
@@ -232,19 +232,21 @@ More detail and specific examples can be found in the included HTML file.
for
(
var
i
=
0
;
i
<
data
.
length
;
++
i
)
{
for
(
var
i
=
0
;
i
<
data
.
length
;
++
i
)
{
if
(
data
[
i
].
data
[
0
][
1
]
/
total
<=
options
.
series
.
pie
.
combine
.
threshold
)
{
var
value
=
data
[
i
].
data
[
0
][
1
];
combined
+=
data
[
i
].
data
[
0
][
1
];
if
(
value
/
total
<=
options
.
series
.
pie
.
combine
.
threshold
)
{
combined
+=
value
;
numCombined
++
;
numCombined
++
;
if
(
!
color
)
{
if
(
!
color
)
{
color
=
data
[
i
].
color
;
color
=
data
[
i
].
color
;
}
}
}
else
{
}
else
{
newdata
.
push
({
newdata
.
push
({
data
:
[[
1
,
data
[
i
].
data
[
0
][
1
]
]],
data
:
[[
1
,
value
]],
color
:
data
[
i
].
color
,
color
:
data
[
i
].
color
,
label
:
data
[
i
].
label
,
label
:
data
[
i
].
label
,
angle
:
data
[
i
].
data
[
0
][
1
]
*
Math
.
PI
*
2
/
total
,
angle
:
value
*
Math
.
PI
*
2
/
total
,
percent
:
data
[
i
].
data
[
0
][
1
]
/
(
total
/
100
)
percent
:
value
/
(
total
/
100
)
});
});
}
}
}
}
...
...
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