Debian Codegraph @

examples/resize/index.html

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <title>Flot Examples: Resizing</title>
6 <link href="../examples.css" rel="stylesheet" type="text/css">
7 <link href="../shared/jquery-ui/jquery-ui.min.css" rel="stylesheet" type="text/css">
8 <script language="javascript" type="text/javascript" src="../../source/jquery.js"></script>
9 <script language="javascript" type="text/javascript" src="../shared/jquery-ui/jquery-ui.min.js"></script>
10 <script language="javascript" type="text/javascript" src="../../source/jquery.canvaswrapper.js"></script>
11 <script language="javascript" type="text/javascript" src="../../source/jquery.colorhelpers.js"></script>
12 <script language="javascript" type="text/javascript" src="../../source/jquery.flot.js"></script>
13 <script language="javascript" type="text/javascript" src="../../source/jquery.flot.saturated.js"></script>
14 <script language="javascript" type="text/javascript" src="../../source/jquery.flot.browser.js"></script>
15 <script language="javascript" type="text/javascript" src="../../source/jquery.flot.drawSeries.js"></script>
16 <script language="javascript" type="text/javascript" src="../../source/jquery.flot.uiConstants.js"></script>
17 <script language="javascript" type="text/javascript" src="../../source/jquery.flot.resize.js"></script>
18
19 <script type="text/javascript">
20
21 $(function() {
22
23 var d1 = [];
24 for (var i = 0; i < 14; i += 0.5) {
25 d1.push([i, Math.sin(i)]);
26 }
27
28 var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];
29 var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];
30
31 var placeholder = $("#placeholder");
32 var plot = $.plot(placeholder, [d1, d2, d3]);
33
34 // The plugin includes a jQuery plugin for adding resize events to any
35 // element. Add a callback so we can display the placeholder size.
36
37 placeholder.resize(function () {
38 $(".message").text("Placeholder is now "
39 + $(this).width() + "x" + $(this).height()
40 + " pixels");
41 });
42
43 $(".demo-container").resizable({
44 maxWidth: 900,
45 maxHeight: 500,
46 minWidth: 450,
47 minHeight: 250
48 });
49
50 // Add the Flot version string to the footer
51
52 $("#footer").prepend("Flot " + $.plot.version + " &ndash; ");
53 });
54
55 </script>
56 </head>
57 <body>
58
59 <div id="header">
60 <h2>Resizing</h2>
61 </div>
62
63 <div id="content">
64
65 <div class="demo-container">
66 <div id="placeholder" class="demo-placeholder"></div>
67 </div>
68
69 <p class="message"></p>
70
71 <p>Sometimes it makes more sense to just let the plot take up the available space. In that case, we need to redraw the plot each time the placeholder changes its size. If you include the resize plugin, this is handled automatically.</p>
72
73 <p>Drag the bottom and right sides of the plot to resize it.</p>
74
75 </div>
76
77 <div id="footer">
78 Copyright &copy; 2007 - 2014 IOLA and Ole Laursen
79 </div>
80
81 </body>
82 </html>