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
f39c71fb
Commit
f39c71fb
authored
May 29, 2013
by
David Schnur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused variable definitions.
parent
9fc03e53
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
18 deletions
+18
-18
jquery.flot.crosshair.js
jquery.flot.crosshair.js
+1
-1
jquery.flot.js
jquery.flot.js
+8
-8
jquery.flot.pie.js
jquery.flot.pie.js
+1
-1
jquery.flot.resize.js
jquery.flot.resize.js
+2
-2
jquery.flot.selection.js
jquery.flot.selection.js
+1
-1
jquery.flot.symbol.js
jquery.flot.symbol.js
+4
-4
jquery.flot.time.js
jquery.flot.time.js
+1
-1
No files found.
jquery.flot.crosshair.js
View file @
f39c71fb
...
@@ -96,7 +96,7 @@ The plugin also adds four public methods:
...
@@ -96,7 +96,7 @@ The plugin also adds four public methods:
crosshair
.
locked
=
false
;
crosshair
.
locked
=
false
;
};
};
function
onMouseOut
(
e
)
{
function
onMouseOut
()
{
if
(
crosshair
.
locked
)
{
if
(
crosshair
.
locked
)
{
return
;
return
;
}
}
...
...
jquery.flot.js
View file @
f39c71fb
...
@@ -636,7 +636,7 @@ Licensed under the MIT license.
...
@@ -636,7 +636,7 @@ Licensed under the MIT license.
};
};
plot
.
getData
=
function
()
{
return
series
;
};
plot
.
getData
=
function
()
{
return
series
;
};
plot
.
getAxes
=
function
()
{
plot
.
getAxes
=
function
()
{
var
res
=
{}
,
i
;
var
res
=
{};
$
.
each
(
xaxes
.
concat
(
yaxes
),
function
(
_
,
axis
)
{
$
.
each
(
xaxes
.
concat
(
yaxes
),
function
(
_
,
axis
)
{
if
(
axis
)
{
if
(
axis
)
{
res
[
axis
.
direction
+
(
axis
.
n
!==
1
?
axis
.
n
:
""
)
+
"axis"
]
=
axis
;
res
[
axis
.
direction
+
(
axis
.
n
!==
1
?
axis
.
n
:
""
)
+
"axis"
]
=
axis
;
...
@@ -1069,8 +1069,8 @@ Licensed under the MIT license.
...
@@ -1069,8 +1069,8 @@ Licensed under the MIT license.
var
topSentry
=
Number
.
POSITIVE_INFINITY
,
var
topSentry
=
Number
.
POSITIVE_INFINITY
,
bottomSentry
=
Number
.
NEGATIVE_INFINITY
,
bottomSentry
=
Number
.
NEGATIVE_INFINITY
,
fakeInfinity
=
Number
.
MAX_VALUE
,
fakeInfinity
=
Number
.
MAX_VALUE
,
i
,
j
,
k
,
m
,
length
,
i
,
j
,
k
,
m
,
s
,
points
,
ps
,
x
,
y
,
axis
,
val
,
f
,
p
,
s
,
points
,
ps
,
val
,
f
,
p
,
data
,
format
;
data
,
format
;
function
updateAxis
(
axis
,
min
,
max
)
{
function
updateAxis
(
axis
,
min
,
max
)
{
...
@@ -1443,7 +1443,7 @@ Licensed under the MIT license.
...
@@ -1443,7 +1443,7 @@ Licensed under the MIT license.
axisMargin
=
options
.
grid
.
axisMargin
,
axisMargin
=
options
.
grid
.
axisMargin
,
padding
=
options
.
grid
.
labelMargin
,
padding
=
options
.
grid
.
labelMargin
,
all
=
axis
.
direction
===
"x"
?
xaxes
:
yaxes
,
all
=
axis
.
direction
===
"x"
?
xaxes
:
yaxes
,
in
dex
,
in
nermost
;
innermost
;
// determine axis margin
// determine axis margin
var
samePosition
=
$
.
grep
(
all
,
function
(
a
)
{
var
samePosition
=
$
.
grep
(
all
,
function
(
a
)
{
...
@@ -1518,7 +1518,7 @@ Licensed under the MIT license.
...
@@ -1518,7 +1518,7 @@ Licensed under the MIT license.
// inside the canvas and isn't clipped off
// inside the canvas and isn't clipped off
var
minMargin
=
options
.
grid
.
minBorderMargin
,
var
minMargin
=
options
.
grid
.
minBorderMargin
,
margins
=
{
x
:
0
,
y
:
0
},
i
,
axis
;
margins
=
{
x
:
0
,
y
:
0
},
i
;
// check stuff from the plot (FIXME: this should just read
// check stuff from the plot (FIXME: this should just read
// a value from the series, otherwise it's impossible to
// a value from the series, otherwise it's impossible to
...
@@ -2332,7 +2332,7 @@ Licensed under the MIT license.
...
@@ -2332,7 +2332,7 @@ Licensed under the MIT license.
var
points
=
datapoints
.
points
,
var
points
=
datapoints
.
points
,
ps
=
datapoints
.
pointsize
,
ps
=
datapoints
.
pointsize
,
bottom
=
Math
.
min
(
Math
.
max
(
0
,
axisy
.
min
),
axisy
.
max
),
bottom
=
Math
.
min
(
Math
.
max
(
0
,
axisy
.
min
),
axisy
.
max
),
i
=
0
,
top
,
areaOpen
=
false
,
i
=
0
,
areaOpen
=
false
,
ypos
=
1
,
segmentStart
=
0
,
segmentEnd
=
0
;
ypos
=
1
,
segmentStart
=
0
,
segmentEnd
=
0
;
// we process each segment in two turns, first forward
// we process each segment in two turns, first forward
...
@@ -2864,7 +2864,7 @@ Licensed under the MIT license.
...
@@ -2864,7 +2864,7 @@ Licensed under the MIT license.
function
findNearbyItem
(
mouseX
,
mouseY
,
seriesFilter
)
{
function
findNearbyItem
(
mouseX
,
mouseY
,
seriesFilter
)
{
var
maxDistance
=
options
.
grid
.
mouseActiveRadius
,
var
maxDistance
=
options
.
grid
.
mouseActiveRadius
,
smallestDistance
=
maxDistance
*
maxDistance
+
1
,
smallestDistance
=
maxDistance
*
maxDistance
+
1
,
item
=
null
,
foundPoint
=
false
,
i
,
j
,
ps
;
item
=
null
,
i
,
j
,
ps
;
for
(
i
=
series
.
length
-
1
;
i
>=
0
;
--
i
)
{
for
(
i
=
series
.
length
-
1
;
i
>=
0
;
--
i
)
{
if
(
!
seriesFilter
(
series
[
i
]))
{
if
(
!
seriesFilter
(
series
[
i
]))
{
...
@@ -2965,7 +2965,7 @@ Licensed under the MIT license.
...
@@ -2965,7 +2965,7 @@ Licensed under the MIT license.
function
onMouseLeave
(
e
)
{
function
onMouseLeave
(
e
)
{
if
(
options
.
grid
.
hoverable
)
{
if
(
options
.
grid
.
hoverable
)
{
triggerClickHoverEvent
(
"plothover"
,
e
,
triggerClickHoverEvent
(
"plothover"
,
e
,
function
(
s
)
{
return
false
;
});
function
()
{
return
false
;
});
}
}
}
}
...
...
jquery.flot.pie.js
View file @
f39c71fb
...
@@ -149,7 +149,7 @@ More detail and specific examples can be found in the included HTML file.
...
@@ -149,7 +149,7 @@ More detail and specific examples can be found in the included HTML file.
}
}
});
});
function
processDatapoints
(
plot
,
series
,
datapoints
)
{
function
processDatapoints
(
plot
)
{
if
(
!
processed
)
{
if
(
!
processed
)
{
processed
=
true
;
processed
=
true
;
canvas
=
plot
.
getCanvas
();
canvas
=
plot
.
getCanvas
();
...
...
jquery.flot.resize.js
View file @
f39c71fb
...
@@ -40,11 +40,11 @@ can just fix the size of their placeholders.
...
@@ -40,11 +40,11 @@ can just fix the size of their placeholders.
plot
.
draw
();
plot
.
draw
();
}
}
function
bindEvents
(
plot
,
eventHolder
)
{
function
bindEvents
(
plot
)
{
plot
.
getPlaceholder
().
resize
(
onResize
);
plot
.
getPlaceholder
().
resize
(
onResize
);
}
}
function
shutdown
(
plot
,
eventHolder
)
{
function
shutdown
(
plot
)
{
plot
.
getPlaceholder
().
unbind
(
"resize"
,
onResize
);
plot
.
getPlaceholder
().
unbind
(
"resize"
,
onResize
);
}
}
...
...
jquery.flot.selection.js
View file @
f39c71fb
...
@@ -269,7 +269,7 @@ The plugin allso adds the following methods to the plot object:
...
@@ -269,7 +269,7 @@ The plugin allso adds the following methods to the plot object:
}
}
function
setSelection
(
ranges
,
preventEvent
)
{
function
setSelection
(
ranges
,
preventEvent
)
{
var
axis
,
range
,
o
=
plot
.
getOptions
();
var
range
,
o
=
plot
.
getOptions
();
if
(
o
.
selection
.
mode
===
"y"
)
{
if
(
o
.
selection
.
mode
===
"y"
)
{
selection
.
first
.
x
=
0
;
selection
.
first
.
x
=
0
;
...
...
jquery.flot.symbol.js
View file @
f39c71fb
...
@@ -14,17 +14,17 @@ The symbols are accessed as strings through the standard symbol options:
...
@@ -14,17 +14,17 @@ The symbols are accessed as strings through the standard symbol options:
*/
*/
(
function
(
$
)
{
(
function
(
$
)
{
function
processRawData
(
plot
,
series
,
datapoints
)
{
function
processRawData
(
plot
,
series
)
{
// we normalize the area of each symbol so it is approximately the
// we normalize the area of each symbol so it is approximately the
// same as a circle of the given radius
// same as a circle of the given radius
var
handlers
=
{
var
handlers
=
{
square
:
function
(
ctx
,
x
,
y
,
radius
,
shadow
)
{
square
:
function
(
ctx
,
x
,
y
,
radius
)
{
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
var
size
=
radius
*
Math
.
sqrt
(
Math
.
PI
)
/
2
;
var
size
=
radius
*
Math
.
sqrt
(
Math
.
PI
)
/
2
;
ctx
.
rect
(
x
-
size
,
y
-
size
,
size
+
size
,
size
+
size
);
ctx
.
rect
(
x
-
size
,
y
-
size
,
size
+
size
,
size
+
size
);
},
},
diamond
:
function
(
ctx
,
x
,
y
,
radius
,
shadow
)
{
diamond
:
function
(
ctx
,
x
,
y
,
radius
)
{
// pi * r^2 = 2s^2 => s = r * sqrt(pi/2)
// pi * r^2 = 2s^2 => s = r * sqrt(pi/2)
var
size
=
radius
*
Math
.
sqrt
(
Math
.
PI
/
2
);
var
size
=
radius
*
Math
.
sqrt
(
Math
.
PI
/
2
);
ctx
.
moveTo
(
x
-
size
,
y
);
ctx
.
moveTo
(
x
-
size
,
y
);
...
@@ -44,7 +44,7 @@ The symbols are accessed as strings through the standard symbol options:
...
@@ -44,7 +44,7 @@ The symbols are accessed as strings through the standard symbol options:
ctx
.
lineTo
(
x
-
size
/
2
,
y
+
height
/
2
);
ctx
.
lineTo
(
x
-
size
/
2
,
y
+
height
/
2
);
}
}
},
},
cross
:
function
(
ctx
,
x
,
y
,
radius
,
shadow
)
{
cross
:
function
(
ctx
,
x
,
y
,
radius
)
{
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
var
size
=
radius
*
Math
.
sqrt
(
Math
.
PI
)
/
2
;
var
size
=
radius
*
Math
.
sqrt
(
Math
.
PI
)
/
2
;
ctx
.
moveTo
(
x
-
size
,
y
-
size
);
ctx
.
moveTo
(
x
-
size
,
y
-
size
);
...
...
jquery.flot.time.js
View file @
f39c71fb
...
@@ -195,7 +195,7 @@ API.txt for details.
...
@@ -195,7 +195,7 @@ API.txt for details.
[
1
,
"year"
]]);
[
1
,
"year"
]]);
function
init
(
plot
)
{
function
init
(
plot
)
{
plot
.
hooks
.
processOptions
.
push
(
function
(
plot
,
options
)
{
plot
.
hooks
.
processOptions
.
push
(
function
(
plot
)
{
$
.
each
(
plot
.
getAxes
(),
function
(
axisName
,
axis
)
{
$
.
each
(
plot
.
getAxes
(),
function
(
axisName
,
axis
)
{
var
opts
=
axis
.
options
;
var
opts
=
axis
.
options
;
...
...
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