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
Expand all
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
This diff is collapsed.
Click to expand it.
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