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
5c005f6b
Commit
5c005f6b
authored
May 29, 2013
by
David Schnur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrap for...in loop bodies with hasOwnProperty.
parent
e0413b93
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
18 deletions
+27
-18
jquery.flot.categories.js
jquery.flot.categories.js
+11
-6
jquery.flot.js
jquery.flot.js
+4
-2
jquery.flot.selection.js
jquery.flot.selection.js
+12
-10
No files found.
jquery.flot.categories.js
View file @
5c005f6b
...
...
@@ -110,13 +110,16 @@ as "categories" on the axis object, e.g. plot.getAxes().xaxis.categories.
}
function
categoriesTickGenerator
(
axis
)
{
var
res
=
[];
for
(
var
label
in
axis
.
categories
)
{
var
v
=
axis
.
categories
[
label
];
var
res
=
[],
categories
=
axis
.
categories
;
for
(
var
label
in
categories
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
categories
,
label
))
{
var
v
=
categories
[
label
];
if
(
v
>=
axis
.
min
&&
v
<=
axis
.
max
)
{
res
.
push
([
v
,
label
]);
}
}
}
res
.
sort
(
function
(
a
,
b
)
{
return
a
[
0
]
-
b
[
0
];
});
...
...
@@ -138,9 +141,11 @@ as "categories" on the axis object, e.g. plot.getAxes().xaxis.categories.
}
else
{
for
(
var
v
in
o
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
o
,
v
))
{
c
[
v
]
=
o
[
v
];
}
}
}
series
[
axis
].
categories
=
c
;
}
...
...
jquery.flot.js
View file @
5c005f6b
...
...
@@ -1552,14 +1552,16 @@ Licensed under the MIT license.
function
setupGrid
()
{
var
axes
=
allAxes
(),
showGrid
=
options
.
grid
.
show
,
margin
=
options
.
grid
.
margin
||
0
,
i
,
a
;
// Initialize the plot's offset from the edge of the canvas
for
(
a
in
plotOffset
)
{
var
margin
=
options
.
grid
.
margin
||
0
;
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
plotOffset
,
a
))
{
plotOffset
[
a
]
=
typeof
margin
===
"number"
?
margin
:
margin
[
a
]
||
0
;
}
}
executeHooks
(
hooks
.
processOffset
,
[
plotOffset
]);
...
...
jquery.flot.selection.js
View file @
5c005f6b
...
...
@@ -237,6 +237,7 @@ The plugin allso adds the following methods to the plot object:
var
axis
,
from
,
to
,
key
,
axes
=
plot
.
getAxes
();
for
(
var
k
in
axes
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
axes
,
k
))
{
axis
=
axes
[
k
];
if
(
axis
.
direction
===
coord
)
{
key
=
coord
+
axis
.
n
+
"axis"
;
...
...
@@ -250,6 +251,7 @@ The plugin allso adds the following methods to the plot object:
}
}
}
}
// backwards-compat stuff - to be removed in future
if
(
!
ranges
[
key
])
{
...
...
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