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
61a13d10
Commit
61a13d10
authored
Jan 26, 2013
by
David Schnur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional code & comments cleanup.
parent
492e97ea
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
67 additions
and
57 deletions
+67
-57
index.html
examples/ajax/index.html
+1
-1
index.html
examples/axes-interacting/index.html
+6
-5
index.html
examples/axes-multiple/index.html
+5
-4
index.html
examples/axes-time/index.html
+8
-8
index.html
examples/basic-options/index.html
+1
-1
index.html
examples/basic-usage/index.html
+6
-3
index.html
examples/categories/index.html
+1
-1
index.html
examples/image/index.html
+1
-1
index.html
examples/interacting/index.html
+1
-1
index.html
examples/percentiles/index.html
+14
-14
index.html
examples/realtime/index.html
+6
-3
index.html
examples/series-toggle/index.html
+1
-1
index.html
examples/series-types/index.html
+1
-1
index.html
examples/stacking/index.html
+1
-1
index.html
examples/symbols/index.html
+1
-1
index.html
examples/threshold/index.html
+1
-1
index.html
examples/tracking/index.html
+5
-3
index.html
examples/visitors/index.html
+3
-3
index.html
examples/zooming/index.html
+4
-4
No files found.
examples/ajax/index.html
View file @
61a13d10
...
...
@@ -38,7 +38,7 @@
// Find the URL in the link right next to us, then fetch the data
var
dataurl
=
button
.
siblings
(
'a'
).
attr
(
'href'
);
var
dataurl
=
button
.
siblings
(
"a"
).
attr
(
"href"
);
function
onDataReceived
(
series
)
{
...
...
examples/axes-interacting/index.html
View file @
61a13d10
...
...
@@ -27,7 +27,7 @@
{
data
:
generate
(
2
,
10
,
function
(
x
)
{
return
Math
.
tan
(
x
);}),
xaxis
:
2
,
yaxis
:
4
}
];
var
plot
=
$
.
plot
(
$
(
"#placeholder"
)
,
data
,
{
var
plot
=
$
.
plot
(
"#placeholder"
,
data
,
{
xaxes
:
[
{
position
:
'bottom'
},
{
position
:
'top'
}
...
...
@@ -40,16 +40,17 @@
]
});
// now for each axis, create a div
// Create a div for each axis
$
.
each
(
plot
.
getAxes
(),
function
(
i
,
axis
)
{
if
(
!
axis
.
show
)
return
;
var
box
=
axis
.
box
;
$
(
'<div class="axisTarget" style="position:absolute;left:'
+
box
.
left
+
'px;top:'
+
box
.
top
+
'px;width:'
+
box
.
width
+
'px;height:'
+
box
.
height
+
'px"></div>'
)
.
data
(
'axis.direction'
,
axis
.
direction
)
.
data
(
'axis.n'
,
axis
.
n
)
$
(
"<div class='axisTarget' style='position:absolute; left:"
+
box
.
left
+
"px; top:"
+
box
.
top
+
"px; width:"
+
box
.
width
+
"px; height:"
+
box
.
height
+
"px'></div>"
)
.
data
(
"axis.direction"
,
axis
.
direction
)
.
data
(
"axis.n"
,
axis
.
n
)
.
css
({
backgroundColor
:
"#f00"
,
opacity
:
0
,
cursor
:
"pointer"
})
.
appendTo
(
plot
.
getPlaceholder
())
.
hover
(
...
...
examples/axes-multiple/index.html
View file @
61a13d10
This diff is collapsed.
Click to expand it.
examples/axes-time/index.html
View file @
61a13d10
This diff is collapsed.
Click to expand it.
examples/basic-options/index.html
View file @
61a13d10
...
...
@@ -26,7 +26,7 @@
d3
.
push
([
i
,
Math
.
tan
(
i
)]);
}
$
.
plot
(
$
(
"#placeholder"
)
,
[
$
.
plot
(
"#placeholder"
,
[
{
label
:
"sin(x)"
,
data
:
d1
},
{
label
:
"cos(x)"
,
data
:
d2
},
{
label
:
"tan(x)"
,
data
:
d3
}
...
...
examples/basic-usage/index.html
View file @
61a13d10
...
...
@@ -10,13 +10,16 @@
<script
type=
"text/javascript"
>
$
(
function
()
{
var
d1
=
[];
for
(
var
i
=
0
;
i
<
14
;
i
+=
0.5
)
d1
.
push
([
i
,
Math
.
sin
(
i
)]);
for
(
var
i
=
0
;
i
<
14
;
i
+=
0.5
)
{
d1
.
push
([
i
,
Math
.
sin
(
i
)]);
}
var
d2
=
[[
0
,
3
],
[
4
,
8
],
[
8
,
5
],
[
9
,
13
]];
// a null signifies separate line segments
// A null signifies separate line segments
var
d3
=
[[
0
,
12
],
[
7
,
12
],
null
,
[
7
,
2.5
],
[
12
,
2.5
]];
$
.
plot
(
"#placeholder"
,
[
d1
,
d2
,
d3
]);
...
...
examples/categories/index.html
View file @
61a13d10
...
...
@@ -14,7 +14,7 @@
var
data
=
[
[
"January"
,
10
],
[
"February"
,
8
],
[
"March"
,
4
],
[
"April"
,
13
],
[
"May"
,
17
],
[
"June"
,
9
]
];
$
.
plot
(
$
(
"#placeholder"
)
,
[
data
],
{
$
.
plot
(
"#placeholder"
,
[
data
],
{
series
:
{
bars
:
{
show
:
true
,
...
...
examples/image/index.html
View file @
61a13d10
...
...
@@ -31,7 +31,7 @@
};
$
.
plot
.
image
.
loadDataImages
(
data
,
options
,
function
()
{
$
.
plot
(
$
(
"#placeholder"
)
,
data
,
options
);
$
.
plot
(
"#placeholder"
,
data
,
options
);
});
});
...
...
examples/interacting/index.html
View file @
61a13d10
...
...
@@ -19,7 +19,7 @@
cos
.
push
([
i
,
Math
.
cos
(
i
)]);
}
var
plot
=
$
.
plot
(
$
(
"#placeholder"
)
,
[
var
plot
=
$
.
plot
(
"#placeholder"
,
[
{
data
:
sin
,
label
:
"sin(x)"
},
{
data
:
cos
,
label
:
"cos(x)"
}
],
{
...
...
examples/percentiles/index.html
View file @
61a13d10
This diff is collapsed.
Click to expand it.
examples/realtime/index.html
View file @
61a13d10
...
...
@@ -64,9 +64,9 @@
}
});
var
plot
=
$
.
plot
(
$
(
"#placeholder"
)
,
[
getRandomData
()
],
{
var
plot
=
$
.
plot
(
"#placeholder"
,
[
getRandomData
()
],
{
series
:
{
shadowSize
:
0
//
d
rawing is faster without shadows
shadowSize
:
0
//
D
rawing is faster without shadows
},
yaxis
:
{
min
:
0
,
...
...
@@ -78,8 +78,11 @@
});
function
update
()
{
plot
.
setData
([
getRandomData
()
]);
plot
.
setData
([
getRandomData
()]);
// Since the axes don't change, we don't need to call plot.setupGrid()
plot
.
draw
();
setTimeout
(
update
,
updateInterval
);
}
...
...
examples/series-toggle/index.html
View file @
61a13d10
...
...
@@ -74,7 +74,7 @@
});
if
(
data
.
length
>
0
)
{
$
.
plot
(
$
(
"#placeholder"
)
,
data
,
{
$
.
plot
(
"#placeholder"
,
data
,
{
yaxis
:
{
min
:
0
},
...
...
examples/series-types/index.html
View file @
61a13d10
...
...
@@ -38,7 +38,7 @@
d6
.
push
([
i
,
Math
.
sqrt
(
2
*
i
+
Math
.
sin
(
i
)
+
5
)]);
}
$
.
plot
(
$
(
"#placeholder"
)
,
[{
$
.
plot
(
"#placeholder"
,
[{
data
:
d1
,
lines
:
{
show
:
true
,
fill
:
true
}
},
{
...
...
examples/stacking/index.html
View file @
61a13d10
...
...
@@ -33,7 +33,7 @@
steps
=
false
;
function
plotWithOptions
()
{
$
.
plot
(
$
(
"#placeholder"
)
,
[
d1
,
d2
,
d3
],
{
$
.
plot
(
"#placeholder"
,
[
d1
,
d2
,
d3
],
{
series
:
{
stack
:
stack
,
lines
:
{
...
...
examples/symbols/index.html
View file @
61a13d10
...
...
@@ -33,7 +33,7 @@
{
data
:
generate
(
7
,
1.1
),
points
:
{
symbol
:
"cross"
}
}
];
$
.
plot
(
$
(
"#placeholder"
)
,
data
,
{
$
.
plot
(
"#placeholder"
,
data
,
{
series
:
{
points
:
{
show
:
true
,
...
...
examples/threshold/index.html
View file @
61a13d10
...
...
@@ -18,7 +18,7 @@
}
function
plotWithOptions
(
t
)
{
$
.
plot
(
$
(
"#placeholder"
)
,
[{
$
.
plot
(
"#placeholder"
,
[{
data
:
d1
,
color
:
"rgb(30, 180, 20)"
,
threshold
:
{
...
...
examples/tracking/index.html
View file @
61a13d10
...
...
@@ -18,7 +18,7 @@
cos
.
push
([
i
,
Math
.
cos
(
i
)]);
}
plot
=
$
.
plot
(
$
(
"#placeholder"
)
,
[
plot
=
$
.
plot
(
"#placeholder"
,
[
{
data
:
sin
,
label
:
"sin(x) = -0.00"
},
{
data
:
cos
,
label
:
"cos(x) = -0.00"
}
],
{
...
...
@@ -67,14 +67,16 @@
var
series
=
dataset
[
i
];
// find the nearest points, x-wise
// Find the nearest points, x-wise
for
(
j
=
0
;
j
<
series
.
data
.
length
;
++
j
)
{
if
(
series
.
data
[
j
][
0
]
>
pos
.
x
)
{
break
;
}
}
// now interpolate
// Now Interpolate
var
y
,
p1
=
series
.
data
[
j
-
1
],
p2
=
series
.
data
[
j
];
...
...
examples/visitors/index.html
View file @
61a13d10
...
...
@@ -63,9 +63,9 @@
}
};
var
plot
=
$
.
plot
(
$
(
"#placeholder"
)
,
[
d
],
options
);
var
plot
=
$
.
plot
(
"#placeholder"
,
[
d
],
options
);
var
overview
=
$
.
plot
(
$
(
"#overview"
)
,
[
d
],
{
var
overview
=
$
.
plot
(
"#overview"
,
[
d
],
{
series
:
{
lines
:
{
show
:
true
,
...
...
@@ -93,7 +93,7 @@
// do the zooming
plot
=
$
.
plot
(
$
(
"#placeholder"
)
,
[
d
],
$
.
extend
(
true
,
{},
options
,
{
plot
=
$
.
plot
(
"#placeholder"
,
[
d
],
$
.
extend
(
true
,
{},
options
,
{
xaxis
:
{
min
:
ranges
.
xaxis
.
from
,
max
:
ranges
.
xaxis
.
to
...
...
examples/zooming/index.html
View file @
61a13d10
...
...
@@ -49,11 +49,11 @@
var
startData
=
getData
(
0
,
3
*
Math
.
PI
);
var
plot
=
$
.
plot
(
$
(
"#placeholder"
)
,
startData
,
options
);
var
plot
=
$
.
plot
(
"#placeholder"
,
startData
,
options
);
//
setup overview
//
Create the overview plot
var
overview
=
$
.
plot
(
$
(
"#overview"
)
,
startData
,
{
var
overview
=
$
.
plot
(
"#overview"
,
startData
,
{
legend
:
{
show
:
false
},
...
...
@@ -96,7 +96,7 @@
// do the zooming
plot
=
$
.
plot
(
$
(
"#placeholder"
)
,
getData
(
ranges
.
xaxis
.
from
,
ranges
.
xaxis
.
to
),
plot
=
$
.
plot
(
"#placeholder"
,
getData
(
ranges
.
xaxis
.
from
,
ranges
.
xaxis
.
to
),
$
.
extend
(
true
,
{},
options
,
{
xaxis
:
{
min
:
ranges
.
xaxis
.
from
,
max
:
ranges
.
xaxis
.
to
},
yaxis
:
{
min
:
ranges
.
yaxis
.
from
,
max
:
ranges
.
yaxis
.
to
}
...
...
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