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
fcc7c16b
Commit
fcc7c16b
authored
Jan 21, 2014
by
Nick Schonning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JSCS: Remove space between function and bracket
parent
67dce054
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
76 additions
and
76 deletions
+76
-76
jquery.flot.categories.js
jquery.flot.categories.js
+2
-2
jquery.flot.crosshair.js
jquery.flot.crosshair.js
+5
-5
jquery.flot.errorbars.js
jquery.flot.errorbars.js
+2
-2
jquery.flot.fillbetween.js
jquery.flot.fillbetween.js
+1
-1
jquery.flot.image.js
jquery.flot.image.js
+9
-9
jquery.flot.js
jquery.flot.js
+34
-34
jquery.flot.navigate.js
jquery.flot.navigate.js
+6
-6
jquery.flot.resize.js
jquery.flot.resize.js
+1
-1
jquery.flot.selection.js
jquery.flot.selection.js
+7
-7
jquery.flot.stack.js
jquery.flot.stack.js
+1
-1
jquery.flot.symbol.js
jquery.flot.symbol.js
+5
-5
jquery.flot.threshold.js
jquery.flot.threshold.js
+1
-1
jquery.flot.time.js
jquery.flot.time.js
+2
-2
No files found.
jquery.flot.categories.js
View file @
fcc7c16b
...
...
@@ -43,7 +43,7 @@ as "categories" on the axis object, e.g. plot.getAxes().xaxis.categories.
*/
(
function
(
$
)
{
(
function
(
$
)
{
var
options
=
{
xaxis
:
{
categories
:
null
...
...
@@ -121,7 +121,7 @@ as "categories" on the axis object, e.g. plot.getAxes().xaxis.categories.
}
}
res
.
sort
(
function
(
a
,
b
)
{
return
a
[
0
]
-
b
[
0
];
});
res
.
sort
(
function
(
a
,
b
)
{
return
a
[
0
]
-
b
[
0
];
});
return
res
;
}
...
...
jquery.flot.crosshair.js
View file @
fcc7c16b
...
...
@@ -40,7 +40,7 @@ The plugin also adds four public methods:
Example usage:
var myFlot = $.plot( $("#graph"), ..., { crosshair: { mode: "x" } } };
$("#graph").bind( "plothover", function
( evt, position, item ) {
$("#graph").bind( "plothover", function( evt, position, item ) {
if ( item ) {
// Lock the crosshair to the data point being hovered
myFlot.lockCrosshair({
...
...
@@ -58,7 +58,7 @@ The plugin also adds four public methods:
Free the crosshair to move again after locking it.
*/
(
function
(
$
)
{
(
function
(
$
)
{
var
options
=
{
crosshair
:
{
...
...
@@ -124,7 +124,7 @@ The plugin also adds four public methods:
plot
.
triggerRedrawOverlay
();
}
plot
.
hooks
.
bindEvents
.
push
(
function
(
plot
,
eventHolder
)
{
plot
.
hooks
.
bindEvents
.
push
(
function
(
plot
,
eventHolder
)
{
if
(
!
plot
.
getOptions
().
crosshair
.
mode
)
{
return
;
}
...
...
@@ -133,7 +133,7 @@ The plugin also adds four public methods:
eventHolder
.
mousemove
(
onMouseMove
);
});
plot
.
hooks
.
drawOverlay
.
push
(
function
(
plot
,
ctx
)
{
plot
.
hooks
.
drawOverlay
.
push
(
function
(
plot
,
ctx
)
{
var
c
=
plot
.
getOptions
().
crosshair
;
if
(
!
c
.
mode
)
{
return
;
...
...
@@ -167,7 +167,7 @@ The plugin also adds four public methods:
ctx
.
restore
();
});
plot
.
hooks
.
shutdown
.
push
(
function
(
plot
,
eventHolder
)
{
plot
.
hooks
.
shutdown
.
push
(
function
(
plot
,
eventHolder
)
{
eventHolder
.
unbind
(
"mouseout"
,
onMouseOut
);
eventHolder
.
unbind
(
"mousemove"
,
onMouseMove
);
});
...
...
jquery.flot.errorbars.js
View file @
fcc7c16b
...
...
@@ -62,7 +62,7 @@ shadowSize and lineWidth are derived as well from the points series.
*/
(
function
(
$
)
{
(
function
(
$
)
{
var
options
=
{
series
:
{
points
:
{
...
...
@@ -377,7 +377,7 @@ shadowSize and lineWidth are derived as well from the points series.
ctx
.
save
();
ctx
.
translate
(
plotOffset
.
left
,
plotOffset
.
top
);
$
.
each
(
plot
.
getData
(),
function
(
i
,
s
)
{
$
.
each
(
plot
.
getData
(),
function
(
i
,
s
)
{
if
(
s
.
points
.
errorbars
&&
(
s
.
points
.
xerr
.
show
||
s
.
points
.
yerr
.
show
))
{
drawSeriesErrors
(
plot
,
ctx
,
s
);
}
...
...
jquery.flot.fillbetween.js
View file @
fcc7c16b
...
...
@@ -29,7 +29,7 @@ jquery.flot.stack.js plugin, possibly some code could be shared.
*/
(
function
(
$
)
{
(
function
(
$
)
{
var
options
=
{
series
:
{
...
...
jquery.flot.image.js
View file @
fcc7c16b
...
...
@@ -52,7 +52,7 @@ Google Maps).
*/
(
function
(
$
)
{
(
function
(
$
)
{
var
options
=
{
series
:
{
images
:
{
...
...
@@ -65,12 +65,12 @@ Google Maps).
$
.
plot
.
image
=
{};
$
.
plot
.
image
.
loadDataImages
=
function
(
series
,
options
,
callback
)
{
$
.
plot
.
image
.
loadDataImages
=
function
(
series
,
options
,
callback
)
{
var
urls
=
[],
points
=
[];
var
defaultShow
=
options
.
series
.
images
.
show
;
$
.
each
(
series
,
function
(
i
,
s
)
{
$
.
each
(
series
,
function
(
i
,
s
)
{
if
(
!
(
defaultShow
||
s
.
images
.
show
))
{
return
;
}
...
...
@@ -79,7 +79,7 @@ Google Maps).
s
=
s
.
data
;
}
$
.
each
(
s
,
function
(
i
,
p
)
{
$
.
each
(
s
,
function
(
i
,
p
)
{
if
(
typeof
p
[
0
]
===
"string"
)
{
urls
.
push
(
p
[
0
]);
points
.
push
(
p
);
...
...
@@ -87,8 +87,8 @@ Google Maps).
});
});
$
.
plot
.
image
.
load
(
urls
,
function
(
loadedImages
)
{
$
.
each
(
points
,
function
(
i
,
p
)
{
$
.
plot
.
image
.
load
(
urls
,
function
(
loadedImages
)
{
$
.
each
(
points
,
function
(
i
,
p
)
{
var
url
=
p
[
0
];
if
(
loadedImages
[
url
])
{
p
[
0
]
=
loadedImages
[
url
];
...
...
@@ -99,14 +99,14 @@ Google Maps).
});
};
$
.
plot
.
image
.
load
=
function
(
urls
,
callback
)
{
$
.
plot
.
image
.
load
=
function
(
urls
,
callback
)
{
var
missing
=
urls
.
length
,
loaded
=
{};
if
(
missing
===
0
)
{
callback
({});
}
$
.
each
(
urls
,
function
(
i
,
url
)
{
var
handler
=
function
()
{
$
.
each
(
urls
,
function
(
i
,
url
)
{
var
handler
=
function
()
{
--
missing
;
loaded
[
url
]
=
this
;
...
...
jquery.flot.js
View file @
fcc7c16b
...
...
@@ -742,29 +742,29 @@ Licensed under the MIT license.
plot
.
getPlaceholder
=
function
()
{
return
placeholder
;
};
plot
.
getCanvas
=
function
()
{
return
surface
.
element
;
};
plot
.
getPlotOffset
=
function
()
{
return
plotOffset
;
};
plot
.
width
=
function
()
{
return
plotWidth
;
};
plot
.
height
=
function
()
{
return
plotHeight
;
};
plot
.
offset
=
function
()
{
plot
.
width
=
function
()
{
return
plotWidth
;
};
plot
.
height
=
function
()
{
return
plotHeight
;
};
plot
.
offset
=
function
()
{
var
o
=
eventHolder
.
offset
();
o
.
left
+=
plotOffset
.
left
;
o
.
top
+=
plotOffset
.
top
;
return
o
;
};
plot
.
getData
=
function
()
{
return
series
;
};
plot
.
getAxes
=
function
()
{
plot
.
getData
=
function
()
{
return
series
;
};
plot
.
getAxes
=
function
()
{
var
res
=
{};
$
.
each
(
xaxes
.
concat
(
yaxes
),
function
(
_
,
axis
)
{
$
.
each
(
xaxes
.
concat
(
yaxes
),
function
(
_
,
axis
)
{
if
(
axis
)
{
res
[
axis
.
direction
+
(
axis
.
n
!==
1
?
axis
.
n
:
""
)
+
"axis"
]
=
axis
;
}
});
return
res
;
};
plot
.
getXAxes
=
function
()
{
return
xaxes
;
};
plot
.
getYAxes
=
function
()
{
return
yaxes
;
};
plot
.
getXAxes
=
function
()
{
return
xaxes
;
};
plot
.
getYAxes
=
function
()
{
return
yaxes
;
};
plot
.
c2p
=
canvasToAxisCoords
;
plot
.
p2c
=
axisToCanvasCoords
;
plot
.
getOptions
=
function
()
{
return
options
;
};
plot
.
getOptions
=
function
()
{
return
options
;
};
plot
.
highlight
=
highlight
;
plot
.
unhighlight
=
unhighlight
;
plot
.
triggerRedrawOverlay
=
triggerRedrawOverlay
;
...
...
@@ -775,7 +775,7 @@ Licensed under the MIT license.
};
};
plot
.
shutdown
=
shutdown
;
plot
.
destroy
=
function
()
{
plot
.
destroy
=
function
()
{
shutdown
();
placeholder
.
removeData
(
"plot"
).
empty
();
...
...
@@ -792,7 +792,7 @@ Licensed under the MIT license.
highlights
=
[];
plot
=
null
;
};
plot
.
resize
=
function
(
width
,
height
)
{
plot
.
resize
=
function
(
width
,
height
)
{
width
=
width
||
placeholder
.
width
();
height
=
height
||
placeholder
.
height
();
surface
.
resize
(
width
,
height
);
...
...
@@ -1099,7 +1099,7 @@ Licensed under the MIT license.
function
allAxes
()
{
// return flat array without annoying null entries
return
$
.
grep
(
xaxes
.
concat
(
yaxes
),
function
(
a
)
{
return
a
;
});
return
$
.
grep
(
xaxes
.
concat
(
yaxes
),
function
(
a
)
{
return
a
;
});
}
function
canvasToAxisCoords
(
pos
)
{
...
...
@@ -1291,7 +1291,7 @@ Licensed under the MIT license.
}
}
$
.
each
(
allAxes
(),
function
(
_
,
axis
)
{
$
.
each
(
allAxes
(),
function
(
_
,
axis
)
{
// init axis
axis
.
datamin
=
topSentry
;
axis
.
datamax
=
bottomSentry
;
...
...
@@ -1473,7 +1473,7 @@ Licensed under the MIT license.
updateAxis
(
s
.
yaxis
,
ymin
,
ymax
);
}
$
.
each
(
allAxes
(),
function
(
_
,
axis
)
{
$
.
each
(
allAxes
(),
function
(
_
,
axis
)
{
if
(
axis
.
datamin
===
topSentry
)
{
axis
.
datamin
=
null
;
}
...
...
@@ -1574,15 +1574,15 @@ Licensed under the MIT license.
// data point to canvas coordinate
if
(
t
===
identity
)
{
// slight optimization
axis
.
p2c
=
function
(
p
)
{
return
(
p
-
m
)
*
s
;
};
axis
.
p2c
=
function
(
p
)
{
return
(
p
-
m
)
*
s
;
};
}
else
{
axis
.
p2c
=
function
(
p
)
{
return
(
t
(
p
)
-
m
)
*
s
;
};
axis
.
p2c
=
function
(
p
)
{
return
(
t
(
p
)
-
m
)
*
s
;
};
}
// canvas coordinate to data point
if
(
!
it
)
{
axis
.
c2p
=
function
(
c
)
{
return
m
+
c
/
s
;
};
axis
.
c2p
=
function
(
c
)
{
return
m
+
c
/
s
;
};
}
else
{
axis
.
c2p
=
function
(
c
)
{
return
it
(
m
+
c
/
s
);
};
axis
.
c2p
=
function
(
c
)
{
return
it
(
m
+
c
/
s
);
};
}
}
...
...
@@ -1756,7 +1756,7 @@ Licensed under the MIT license.
// check axis labels, note we don't check the actual
// labels but instead use the overall width/height to not
// jump as much around with replots
$
.
each
(
allAxes
(),
function
(
_
,
axis
)
{
$
.
each
(
allAxes
(),
function
(
_
,
axis
)
{
if
(
axis
.
reserveSpace
&&
axis
.
ticks
&&
axis
.
ticks
.
length
)
{
var
lastTick
=
axis
.
ticks
[
axis
.
ticks
.
length
-
1
];
if
(
axis
.
direction
===
"x"
)
{
...
...
@@ -1806,7 +1806,7 @@ Licensed under the MIT license.
}
// init axes
$
.
each
(
axes
,
function
(
_
,
axis
)
{
$
.
each
(
axes
,
function
(
_
,
axis
)
{
axis
.
show
=
axis
.
options
.
show
;
if
(
axis
.
show
==
null
)
{
axis
.
show
=
axis
.
used
;
// by default an axis is visible if it's got data
...
...
@@ -1819,9 +1819,9 @@ Licensed under the MIT license.
if
(
showGrid
)
{
var
allocatedAxes
=
$
.
grep
(
axes
,
function
(
axis
)
{
return
axis
.
reserveSpace
;
});
var
allocatedAxes
=
$
.
grep
(
axes
,
function
(
axis
)
{
return
axis
.
reserveSpace
;
});
$
.
each
(
allocatedAxes
,
function
(
_
,
axis
)
{
$
.
each
(
allocatedAxes
,
function
(
_
,
axis
)
{
// make the ticks
setupTickGeneration
(
axis
);
setTicks
(
axis
);
...
...
@@ -1840,7 +1840,7 @@ Licensed under the MIT license.
// might stick out
adjustLayoutForThingsStickingOut
();
$
.
each
(
allocatedAxes
,
function
(
_
,
axis
)
{
$
.
each
(
allocatedAxes
,
function
(
_
,
axis
)
{
allocateAxisBoxSecondPhase
(
axis
);
});
}
...
...
@@ -1849,7 +1849,7 @@ Licensed under the MIT license.
plotHeight
=
surface
.
height
-
plotOffset
.
bottom
-
plotOffset
.
top
;
// now we got the proper plot dimensions, we can compute the scaling
$
.
each
(
axes
,
function
(
_
,
axis
)
{
$
.
each
(
axes
,
function
(
_
,
axis
)
{
setTransformationHelpers
(
axis
);
});
...
...
@@ -1964,7 +1964,7 @@ Licensed under the MIT license.
if
(
!
axis
.
tickGenerator
)
{
axis
.
tickGenerator
=
function
(
axis
)
{
axis
.
tickGenerator
=
function
(
axis
)
{
var
ticks
=
[],
start
=
floorInBase
(
axis
.
min
,
axis
.
tickSize
),
...
...
@@ -1981,7 +1981,7 @@ Licensed under the MIT license.
return
ticks
;
};
axis
.
tickFormatter
=
function
(
value
,
axis
)
{
axis
.
tickFormatter
=
function
(
value
,
axis
)
{
var
factor
=
axis
.
tickDecimals
?
Math
.
pow
(
10
,
axis
.
tickDecimals
)
:
1
;
var
formatted
=
""
+
Math
.
round
(
value
*
factor
)
/
factor
;
...
...
@@ -2002,7 +2002,7 @@ Licensed under the MIT license.
}
if
(
$
.
isFunction
(
opts
.
tickFormatter
))
{
axis
.
tickFormatter
=
function
(
v
,
axis
)
{
return
""
+
opts
.
tickFormatter
(
v
,
axis
);
};
axis
.
tickFormatter
=
function
(
v
,
axis
)
{
return
""
+
opts
.
tickFormatter
(
v
,
axis
);
};
}
if
(
opts
.
alignTicksWithAxis
!=
null
)
{
...
...
@@ -2019,7 +2019,7 @@ Licensed under the MIT license.
}
}
axis
.
tickGenerator
=
function
(
axis
)
{
axis
.
tickGenerator
=
function
(
axis
)
{
// copy ticks, scaled to this axis
var
ticks
=
[],
v
,
i
;
for
(
i
=
0
;
i
<
otherAxis
.
ticks
.
length
;
++
i
)
{
...
...
@@ -2481,7 +2481,7 @@ Licensed under the MIT license.
function
drawAxisLabels
()
{
$
.
each
(
allAxes
(),
function
(
_
,
axis
)
{
$
.
each
(
allAxes
(),
function
(
_
,
axis
)
{
var
box
=
axis
.
box
,
axisOptions
=
axis
.
options
,
...
...
@@ -3050,7 +3050,7 @@ Licensed under the MIT license.
barLeft
=
-
series
.
bars
.
barWidth
/
2
;
}
var
fillStyleCallback
=
series
.
bars
.
fill
?
function
(
bottom
,
top
)
{
return
getFillStyle
(
series
.
bars
,
series
.
color
,
bottom
,
top
);
}
:
null
;
var
fillStyleCallback
=
series
.
bars
.
fill
?
function
(
bottom
,
top
)
{
return
getFillStyle
(
series
.
bars
,
series
.
color
,
bottom
,
top
);
}
:
null
;
plotBars
(
series
.
datapoints
,
barLeft
,
barLeft
+
series
.
bars
.
barWidth
,
fillStyleCallback
,
series
.
xaxis
,
series
.
yaxis
);
ctx
.
restore
();
}
...
...
@@ -3332,20 +3332,20 @@ Licensed under the MIT license.
function
onMouseMove
(
e
)
{
if
(
options
.
grid
.
hoverable
)
{
triggerClickHoverEvent
(
"plothover"
,
e
,
function
(
s
)
{
return
s
.
hoverable
!==
false
;
});
function
(
s
)
{
return
s
.
hoverable
!==
false
;
});
}
}
function
onMouseLeave
(
e
)
{
if
(
options
.
grid
.
hoverable
)
{
triggerClickHoverEvent
(
"plothover"
,
e
,
function
()
{
return
false
;
});
function
()
{
return
false
;
});
}
}
function
onClick
(
e
)
{
triggerClickHoverEvent
(
"plotclick"
,
e
,
function
(
s
)
{
return
s
.
clickable
!==
false
;
});
function
(
s
)
{
return
s
.
clickable
!==
false
;
});
}
// trigger click or hover event (they send the same parameters
...
...
@@ -3528,7 +3528,7 @@ Licensed under the MIT license.
octx
.
strokeStyle
=
highlightColor
;
drawBar
(
point
[
0
],
point
[
1
],
point
[
2
]
||
0
,
barLeft
,
barLeft
+
series
.
bars
.
barWidth
,
function
()
{
return
fillStyle
;
},
series
.
xaxis
,
series
.
yaxis
,
octx
,
series
.
bars
.
horizontal
,
series
.
bars
.
lineWidth
);
function
()
{
return
fillStyle
;
},
series
.
xaxis
,
series
.
yaxis
,
octx
,
series
.
bars
.
horizontal
,
series
.
bars
.
lineWidth
);
}
function
getColorOrGradient
(
spec
,
bottom
,
top
,
defaultColor
)
{
...
...
jquery.flot.navigate.js
View file @
fcc7c16b
...
...
@@ -79,7 +79,7 @@ can set the default in the options.
*/
(
function
(
$
)
{
(
function
(
$
)
{
var
options
=
{
xaxis
:
{
zoomRange
:
null
,
// or [number, number] (min range, max range)
...
...
@@ -137,7 +137,7 @@ can set the default in the options.
return
;
}
panTimeout
=
setTimeout
(
function
()
{
panTimeout
=
setTimeout
(
function
()
{
plot
.
pan
({
left
:
prevPageX
-
e
.
pageX
,
top
:
prevPageY
-
e
.
pageY
});
prevPageX
=
e
.
pageX
;
...
...
@@ -172,7 +172,7 @@ can set the default in the options.
}
}
plot
.
zoomOut
=
function
(
args
)
{
plot
.
zoomOut
=
function
(
args
)
{
if
(
!
args
)
{
args
=
{};
}
...
...
@@ -185,7 +185,7 @@ can set the default in the options.
plot
.
zoom
(
args
);
};
plot
.
zoom
=
function
(
args
)
{
plot
.
zoom
=
function
(
args
)
{
if
(
!
args
)
{
args
=
{};
}
...
...
@@ -260,7 +260,7 @@ can set the default in the options.
}
};
plot
.
pan
=
function
(
args
)
{
plot
.
pan
=
function
(
args
)
{
var
delta
=
{
x
:
+
args
.
left
,
y
:
+
args
.
top
...
...
@@ -273,7 +273,7 @@ can set the default in the options.
delta
.
y
=
0
;
}
$
.
each
(
plot
.
getAxes
(),
function
(
_
,
axis
)
{
$
.
each
(
plot
.
getAxes
(),
function
(
_
,
axis
)
{
var
opts
=
axis
.
options
,
min
=
axis
.
c2p
(
axis
.
p2c
(
axis
.
min
)
+
d
),
...
...
jquery.flot.resize.js
View file @
fcc7c16b
...
...
@@ -11,7 +11,7 @@ can just fix the size of their placeholders.
*/
(
function
(
$
)
{
(
function
(
$
)
{
var
options
=
{
};
// no options
function
init
(
plot
)
{
...
...
jquery.flot.selection.js
View file @
fcc7c16b
...
...
@@ -78,7 +78,7 @@ The plugin allso adds the following methods to the plot object:
*/
(
function
(
$
)
{
(
function
(
$
)
{
function
init
(
plot
)
{
var
selection
=
{
...
...
@@ -124,11 +124,11 @@ The plugin allso adds the following methods to the plot object:
// prevent text selection and drag in old-school browsers
if
(
document
.
onselectstart
!==
undefined
&&
savedhandlers
.
onselectstart
===
null
)
{
savedhandlers
.
onselectstart
=
document
.
onselectstart
;
document
.
onselectstart
=
function
()
{
return
false
;
};
document
.
onselectstart
=
function
()
{
return
false
;
};
}
if
(
document
.
ondrag
!==
undefined
&&
savedhandlers
.
ondrag
===
null
)
{
savedhandlers
.
ondrag
=
document
.
ondrag
;
document
.
ondrag
=
function
()
{
return
false
;
};
document
.
ondrag
=
function
()
{
return
false
;
};
}
setSelectionPos
(
selection
.
first
,
e
);
...
...
@@ -137,7 +137,7 @@ The plugin allso adds the following methods to the plot object:
// this is a bit silly, but we have to use a closure to be
// able to whack the same handler again
mouseUpHandler
=
function
(
e
)
{
onMouseUp
(
e
);
};
mouseUpHandler
=
function
(
e
)
{
onMouseUp
(
e
);
};
$
(
document
).
one
(
selection
.
touch
?
"touchend"
:
"mouseup"
,
mouseUpHandler
);
}
...
...
@@ -179,7 +179,7 @@ The plugin allso adds the following methods to the plot object:
c1
=
selection
.
first
,
c2
=
selection
.
second
;
$
.
each
(
plot
.
getAxes
(),
function
(
name
,
axis
)
{
$
.
each
(
plot
.
getAxes
(),
function
(
name
,
axis
)
{
if
(
axis
.
used
)
{
var
p1
=
axis
.
c2p
(
c1
[
axis
.
direction
]),
p2
=
axis
.
c2p
(
c2
[
axis
.
direction
]);
...
...
@@ -339,7 +339,7 @@ The plugin allso adds the following methods to the plot object:
});
plot
.
hooks
.
drawOverlay
.
push
(
function
(
plot
,
ctx
)
{
plot
.
hooks
.
drawOverlay
.
push
(
function
(
plot
,
ctx
)
{
// draw selection
if
(
selection
.
show
&&
selectionIsSane
())
{
var
plotOffset
=
plot
.
getPlotOffset
();
...
...
@@ -367,7 +367,7 @@ The plugin allso adds the following methods to the plot object:
}
});
plot
.
hooks
.
shutdown
.
push
(
function
(
plot
,
eventHolder
)
{
plot
.
hooks
.
shutdown
.
push
(
function
(
plot
,
eventHolder
)
{
eventHolder
.
unbind
(
"mousemove"
,
onMouseMove
);
eventHolder
.
unbind
(
"mousedown"
,
onMouseDown
);
if
(
mouseUpHandler
)
{
...
...
jquery.flot.stack.js
View file @
fcc7c16b
...
...
@@ -35,7 +35,7 @@ charts or filled areas).
*/
(
function
(
$
)
{
(
function
(
$
)
{
var
options
=
{
series
:
{
stack
:
null
}
// or number/string
};
...
...
jquery.flot.symbol.js
View file @
fcc7c16b
...
...
@@ -13,18 +13,18 @@ The symbols are accessed as strings through the standard symbol options:
*/
(
function
(
$
)
{
(
function
(
$
)
{
function
processRawData
(
plot
,
series
)
{
// we normalize the area of each symbol so it is approximately the
// same as a circle of the given radius
var
handlers
=
{
square
:
function
(
ctx
,
x
,
y
,
radius
)
{
square
:
function
(
ctx
,
x
,
y
,
radius
)
{
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
var
size
=
radius
*
Math
.
sqrt
(
Math
.
PI
)
/
2
;
ctx
.
rect
(
x
-
size
,
y
-
size
,
size
+
size
,
size
+
size
);
},
diamond
:
function
(
ctx
,
x
,
y
,
radius
)
{
diamond
:
function
(
ctx
,
x
,
y
,
radius
)
{
// pi * r^2 = 2s^2 => s = r * sqrt(pi/2)
var
size
=
radius
*
Math
.
sqrt
(
Math
.
PI
/
2
);
ctx
.
moveTo
(
x
-
size
,
y
);
...
...
@@ -33,7 +33,7 @@ The symbols are accessed as strings through the standard symbol options:
ctx
.
lineTo
(
x
,
y
+
size
);
ctx
.
lineTo
(
x
-
size
,
y
);
},
triangle
:
function
(
ctx
,
x
,
y
,
radius
,
shadow
)
{
triangle
:
function
(
ctx
,
x
,
y
,
radius
,
shadow
)
{
// pi * r^2 = 1/2 * s^2 * sin (pi / 3) => s = r * sqrt(2 * pi / sin(pi / 3))
var
size
=
radius
*
Math
.
sqrt
(
2
*
Math
.
PI
/
Math
.
sin
(
Math
.
PI
/
3
));
var
height
=
size
*
Math
.
sin
(
Math
.
PI
/
3
);
...
...
@@ -44,7 +44,7 @@ The symbols are accessed as strings through the standard symbol options:
ctx
.
lineTo
(
x
-
size
/
2
,
y
+
height
/
2
);
}
},
cross
:
function
(
ctx
,
x
,
y
,
radius
)
{
cross
:
function
(
ctx
,
x
,
y
,
radius
)
{
// pi * r^2 = (2s)^2 => s = r * sqrt(pi)/2
var
size
=
radius
*
Math
.
sqrt
(
Math
.
PI
)
/
2
;
ctx
.
moveTo
(
x
-
size
,
y
-
size
);
...
...
jquery.flot.threshold.js
View file @
fcc7c16b
...
...
@@ -43,7 +43,7 @@ You may need to check for this in hover events.
*/
(
function
(
$
)
{
(
function
(
$
)
{
var
options
=
{
series
:
{
threshold
:
null
}
// or { below: number, color: color spec}
};
...
...
jquery.flot.time.js
View file @
fcc7c16b
...
...
@@ -226,7 +226,7 @@ API.txt for details.
[
1
,
"year"
]]);
function
init
(
plot
)
{
plot
.
hooks
.
processOptions
.
push
(
function
(
plot
)
{
plot
.
hooks
.
processOptions
.
push
(
function
(
plot
)
{
$
.
each
(
plot
.
getAxes
(),
function
(
axisName
,
axis
)
{
var
opts
=
axis
.
options
;
...
...
@@ -385,7 +385,7 @@ API.txt for details.
return
ticks
;
};
axis
.
tickFormatter
=
function
(
v
,
axis
)
{
axis
.
tickFormatter
=
function
(
v
,
axis
)
{
var
d
=
dateGenerator
(
v
,
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