index.html (3564B)
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: Time zones</title> 6 <link href="../examples.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 <script language="javascript" type="text/javascript" src="../../jquery.flot.time.js"></script> 11 <script language="javascript" type="text/javascript" src="date.js"></script> 12 <script type="text/javascript"> 13 14 $(function() { 15 16 timezoneJS.timezone.zoneFileBasePath = "tz"; 17 timezoneJS.timezone.defaultZoneFile = []; 18 timezoneJS.timezone.init({async: false}); 19 20 var d = [ 21 [Date.UTC(2011, 2, 12, 14, 0, 0), 28], 22 [Date.UTC(2011, 2, 12, 15, 0, 0), 27], 23 [Date.UTC(2011, 2, 12, 16, 0, 0), 25], 24 [Date.UTC(2011, 2, 12, 17, 0, 0), 19], 25 [Date.UTC(2011, 2, 12, 18, 0, 0), 16], 26 [Date.UTC(2011, 2, 12, 19, 0, 0), 14], 27 [Date.UTC(2011, 2, 12, 20, 0, 0), 11], 28 [Date.UTC(2011, 2, 12, 21, 0, 0), 9], 29 [Date.UTC(2011, 2, 12, 22, 0, 0), 7.5], 30 [Date.UTC(2011, 2, 12, 23, 0, 0), 6], 31 [Date.UTC(2011, 2, 13, 0, 0, 0), 5], 32 [Date.UTC(2011, 2, 13, 1, 0, 0), 6], 33 [Date.UTC(2011, 2, 13, 2, 0, 0), 7.5], 34 [Date.UTC(2011, 2, 13, 3, 0, 0), 9], 35 [Date.UTC(2011, 2, 13, 4, 0, 0), 11], 36 [Date.UTC(2011, 2, 13, 5, 0, 0), 14], 37 [Date.UTC(2011, 2, 13, 6, 0, 0), 16], 38 [Date.UTC(2011, 2, 13, 7, 0, 0), 19], 39 [Date.UTC(2011, 2, 13, 8, 0, 0), 25], 40 [Date.UTC(2011, 2, 13, 9, 0, 0), 27], 41 [Date.UTC(2011, 2, 13, 10, 0, 0), 28], 42 [Date.UTC(2011, 2, 13, 11, 0, 0), 29], 43 [Date.UTC(2011, 2, 13, 12, 0, 0), 29.5], 44 [Date.UTC(2011, 2, 13, 13, 0, 0), 29], 45 [Date.UTC(2011, 2, 13, 14, 0, 0), 28], 46 [Date.UTC(2011, 2, 13, 15, 0, 0), 27], 47 [Date.UTC(2011, 2, 13, 16, 0, 0), 25], 48 [Date.UTC(2011, 2, 13, 17, 0, 0), 19], 49 [Date.UTC(2011, 2, 13, 18, 0, 0), 16], 50 [Date.UTC(2011, 2, 13, 19, 0, 0), 14], 51 [Date.UTC(2011, 2, 13, 20, 0, 0), 11], 52 [Date.UTC(2011, 2, 13, 21, 0, 0), 9], 53 [Date.UTC(2011, 2, 13, 22, 0, 0), 7.5], 54 [Date.UTC(2011, 2, 13, 23, 0, 0), 6] 55 ]; 56 57 var plot = $.plot("#placeholderUTC", [d], { 58 xaxis: { 59 mode: "time" 60 } 61 }); 62 63 var plot = $.plot("#placeholderLocal", [d], { 64 xaxis: { 65 mode: "time", 66 timezone: "browser" 67 } 68 }); 69 70 var plot = $.plot("#placeholderChicago", [d], { 71 xaxis: { 72 mode: "time", 73 timezone: "America/Chicago" 74 } 75 }); 76 77 // Add the Flot version string to the footer 78 79 $("#footer").prepend("Flot " + $.plot.version + " – "); 80 }); 81 82 </script> 83 </head> 84 <body> 85 86 <div id="header"> 87 <h2>Time zones</h2> 88 </div> 89 90 <div id="content"> 91 92 <h3>UTC</h3> 93 <div class="demo-container" style="height: 300px;"> 94 <div id="placeholderUTC" class="demo-placeholder"></div> 95 </div> 96 97 <h3>Browser</h3> 98 <div class="demo-container" style="height: 300px;"> 99 <div id="placeholderLocal" class="demo-placeholder"></div> 100 </div> 101 102 <h3>Chicago</h3> 103 <div class="demo-container" style="height: 300px;"> 104 <div id="placeholderChicago" class="demo-placeholder"></div> 105 </div> 106 107 </div> 108 109 <div id="footer"> 110 Copyright © 2007 - 2013 IOLA and Ole Laursen 111 </div> 112 113 </body> 114 </html>