Changeset 276 for Dev/branches/Cartis/dashboardGraphSelection.php
- Timestamp:
- 02/21/12 13:56:17 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/Cartis/dashboardGraphSelection.php
r242 r276 27 27 <script src="RGraph/libraries/RGraph.pie.js" ></script> 28 28 <script src="RGraph/libraries/RGraph.radar.js" ></script> 29 <script src="RGraph/libraries/RGraph.rose.js" ></script> 29 30 30 31 32 33 34 35 36 31 37 <script> 32 38 myGraph.Set('chart.contextmenu', [ … … 36 42 ]); 37 43 </script> 38 39 40 <script>41 window.onload = function ()42 {43 44 var bar1 = new RGraph.Bar('chart1', mockupData.muData3);45 //bar1.Set('chart.background.barcolor1', 'white');46 // bar1.Set('chart.background.barcolor2', 'white');47 bar1.Set('chart.labels', ['1st', '2nd', '3rd', '4th', '5th', '6th']);48 bar1.Set('chart.key', ['John', 'Bob']);49 bar1.Set('chart.key.position.y', 35);50 bar1.Set('chart.key.position', 'gutter');51 bar1.Set('chart.key.background', 'rgb(255,255,255)');52 bar1.Set('chart.colors', ['#77f', '#7f7']);53 bar1.Set('chart.shadow', true);54 bar1.Set('chart.shadow.blur', 15);55 bar1.Set('chart.shadow.offsetx', 0);56 bar1.Set('chart.shadow.offsety', 0);57 bar1.Set('chart.shadow.color', '#aaa');58 bar1.Set('chart.yaxispos', 'right');59 bar1.Set('chart.strokestyle', 'rgba(0,0,0,0)');60 bar1.Set('chart.gutter.left', 5);61 bar1.Set('chart.gutter.right', 45);62 bar1.Draw();63 64 65 66 if (!RGraph.isIE8()) {67 tooltipFunc = function (i)68 {69 var r = i % 4;70 71 if (r == 3) return 'John'72 else if (r == 2) return 'Rich';73 else if (r == 1) return 'Jane';74 else if (r == 0) return 'Quentin';75 }76 bar2.Set('chart.tooltips', tooltipFunc);77 }78 79 bar2.Draw();80 81 }82 </script>83 84 44 85 45 <title> … … 100 60 <div id="wrapper"> 101 61 62 <div id="breadcrumbs" class="largeFrame" style="width: 900px;"> 63 <a href="#" onclick="checkBack('index.php');">Login</a> > 64 <a href="#" onclick="checkBack('dashboardDataSelection.php');">Select data</a> > 65 <a href="#" class="selected">Select graphtype</a> 66 </div> 67 102 68 <div id="leftColumn"> 103 69 … … 106 72 107 73 <div class="largeTitle">Selected data</div> 108 <div class="content" style="width: 300px; height: 500px; "> 74 <div class="content" style="width: 296px; height: 500px; "> 75 <select id="dbSelectedData" multiple class="dbDataList" size="15" style="width: 275px;" onchange="infoPanelTimeout(event);"> 109 76 110 <?php 111 print_r($data); 112 ?> 77 <?php 78 $objCount = count($data->contents->titles); 113 79 80 for ($i = 0; $i < $objCount; $i++) { 81 echo "<option value='" . $data->contents->uids[$i] . "' name='" . $data->contents->types[$i] . "'>" . $data->contents->titles[$i] . "</option>"; 82 } 83 ?> 84 </select> 114 85 </div> 115 86 … … 125 96 <div id="btnSelectBarType" class="graphSelectionButton" onclick="changeGraphType('bar')">BAR CHART</div> 126 97 <div id="btnSelectRadarType" class="graphSelectionButton" onclick="changeGraphType('radar')">RADAR CHART</div> 98 <div id="btnSelectRose" class="graphSelectionButton" onClick="changeGraphType('rose')">ROSE CHART</div> 99 127 100 </div> 128 101 <div class="content" id="graphDisplay"> 129 102 130 103 <canvas id="chart1" width="450" height="200" onclick="RGraph.showPNG(document.getElementById('radar1'));">[No canvas support] </canvas> 131 104 132 105 <!-- Button to gotoDashboard?? --> 133 106 … … 137 110 <input type="button" class="smallButton" value="Save to dashboard" onClick="addToDashboard()"></input> 138 111 <input type="button" class="smallButton" value="Go to Dashboard" onClick="gotoDashboard()"></input> 139 112 140 113 141 114 </div>
Note: See TracChangeset
for help on using the changeset viewer.