| 3284 |
vikas |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
2 |
<html>
|
|
|
3 |
<head>
|
|
|
4 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
5 |
<title>Flot Examples</title>
|
|
|
6 |
<link href="layout.css" rel="stylesheet" type="text/css">
|
|
|
7 |
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
|
|
|
8 |
<script language="javascript" type="text/javascript" src="../jquery.js"></script>
|
|
|
9 |
<script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
|
|
|
10 |
</head>
|
|
|
11 |
<body>
|
|
|
12 |
<h1>Flot Examples</h1>
|
|
|
13 |
|
|
|
14 |
<div id="placeholder" style="width:600px;height:300px;"></div>
|
|
|
15 |
|
|
|
16 |
<p>Simple example. You don't need to specify much to get an
|
|
|
17 |
attractive look. Put in a placeholder, make sure you set its
|
|
|
18 |
dimensions (otherwise the plot library will barf) and call the
|
|
|
19 |
plot function with the data. The axes are automatically
|
|
|
20 |
scaled.</p>
|
|
|
21 |
|
|
|
22 |
<script type="text/javascript">
|
|
|
23 |
$(function () {
|
|
|
24 |
var d1 = [];
|
|
|
25 |
for (var i = 0; i < 14; i += 0.5)
|
|
|
26 |
d1.push([i, Math.sin(i)]);
|
|
|
27 |
|
|
|
28 |
var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];
|
|
|
29 |
|
|
|
30 |
// a null signifies separate line segments
|
|
|
31 |
var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];
|
|
|
32 |
|
|
|
33 |
$.plot($("#placeholder"), [ d1, d2, d3 ]);
|
|
|
34 |
});
|
|
|
35 |
</script>
|
|
|
36 |
|
|
|
37 |
</body>
|
|
|
38 |
</html>
|