1 <?php ob_start('ob_gzhandler') ?>
3 function get_data($item) {
4 $doc = new DOMDocument();
5 $doc->load('http://weather/weather/all-output.xml');
7 foreach ($doc->getElementsByTagName('weather') as $node) {
9 $item => $node->getElementsByTagName($item)->item(0)->nodeValue,
11 array_push($arrFeeds, $itemRSS);
19 <script src="libraries/RGraph.common.core.js" ></script>
20 <script src="libraries/RGraph.common.context.js" ></script>
21 <script src="libraries/RGraph.common.annotate.js" ></script>
22 <script src="libraries/RGraph.common.tooltips.js" ></script>
23 <script src="libraries/RGraph.common.zoom.js" ></script>
24 <script src="libraries/RGraph.common.resizing.js" ></script>
25 <script src="libraries/RGraph.odo.js" ></script>
26 <!--[if IE 8]><script src="excanvas/excanvas.compressed.js"></script><![endif]-->
29 window.onload = function ()
31 var odo2 = new RGraph.Odometer('odo2', 0, 360, <? get_data("windDirectionDegrees"); ?>);
32 odo2.Set('chart.annotatable', false);
33 //odo2.Set('chart.needle.thickness', 6);
34 odo2.Set('chart.needle.color', 'black');
35 odo2.Set('chart.needle.tail', false);
36 //odo2.Set('chart.needle.type', 'triangle');
37 odo2.Set('chart.label.area', 22);
38 odo2.Set('chart.contextmenu', [['Clear', function () {RGraph.Clear(odo2.canvas); odo2.Draw();}]]);
39 //odo2.Set('chart.border', document.all ? false : true);
40 //odo2.Set('chart.tickmarks.highlighted', true);
41 odo2.Set('chart.labels', ['N','NE','E','SE','S','SW','W','NW']);
42 odo2.Set('chart.red.min', 360);
43 odo2.Set('chart.red.color', 'gray');
44 //odo2.Set('chart.value.text', true);
45 odo2.Set('chart.value.units.post', ' degrees');
53 <canvas id="odo2" width="200" height="200"><div class="canvasfallback">[No canvas support]</div></canvas>