1 | <?php |
---|
2 | /* |
---|
3 | * To change this template, choose Tools | Templates |
---|
4 | * and open the template in the editor. |
---|
5 | */ |
---|
6 | |
---|
7 | require "classes/master.php"; |
---|
8 | |
---|
9 | $dbDataSelectionWidget = new dbDataSelectionWidget(); |
---|
10 | $data = JSON_decode($_POST['selectedData']); |
---|
11 | ?> |
---|
12 | |
---|
13 | <!DOCTYPE html> |
---|
14 | <html> |
---|
15 | <head> |
---|
16 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
---|
17 | |
---|
18 | <script type="text/javascript" src="js/generalScripts.js"></script> |
---|
19 | <script type="text/javascript" src="js/dashboardScripts.js"></script> |
---|
20 | <script src="RGraph/libraries/RGraph.common.core.js" ></script> |
---|
21 | <script src="RGraph/libraries/RGraph.common.annotate.js" ></script> |
---|
22 | <script src="RGraph/libraries/RGraph.common.context.js" ></script> |
---|
23 | |
---|
24 | <script src="RGraph/libraries/RGraph.common.tooltips.js" ></script> |
---|
25 | <script src="RGraph/libraries/RGraph.common.resizing.js" ></script> |
---|
26 | <script src="RGraph/libraries/RGraph.bar.js" ></script> |
---|
27 | <script src="RGraph/libraries/RGraph.pie.js" ></script> |
---|
28 | |
---|
29 | |
---|
30 | <script> |
---|
31 | myGraph.Set('chart.contextmenu', [ |
---|
32 | ['Get PNG', RGraph.showPNG], |
---|
33 | null, |
---|
34 | ['Cancel', function () {}] |
---|
35 | ]); |
---|
36 | </script> |
---|
37 | |
---|
38 | |
---|
39 | <script> |
---|
40 | window.onload = function () |
---|
41 | { |
---|
42 | |
---|
43 | var bar1 = new RGraph.Bar('chart1', mockupData.muData3); |
---|
44 | //bar1.Set('chart.background.barcolor1', 'white'); |
---|
45 | // bar1.Set('chart.background.barcolor2', 'white'); |
---|
46 | bar1.Set('chart.labels', ['1st', '2nd', '3rd', '4th', '5th', '6th']); |
---|
47 | bar1.Set('chart.key', ['John', 'Bob']); |
---|
48 | bar1.Set('chart.key.position.y', 35); |
---|
49 | bar1.Set('chart.key.position', 'gutter'); |
---|
50 | bar1.Set('chart.key.background', 'rgb(255,255,255)'); |
---|
51 | bar1.Set('chart.colors', ['#77f', '#7f7']); |
---|
52 | bar1.Set('chart.shadow', true); |
---|
53 | bar1.Set('chart.shadow.blur', 15); |
---|
54 | bar1.Set('chart.shadow.offsetx', 0); |
---|
55 | bar1.Set('chart.shadow.offsety', 0); |
---|
56 | bar1.Set('chart.shadow.color', '#aaa'); |
---|
57 | bar1.Set('chart.yaxispos', 'right'); |
---|
58 | bar1.Set('chart.strokestyle', 'rgba(0,0,0,0)'); |
---|
59 | bar1.Set('chart.gutter.left', 5); |
---|
60 | bar1.Set('chart.gutter.right', 45); |
---|
61 | bar1.Draw(); |
---|
62 | |
---|
63 | |
---|
64 | |
---|
65 | if (!RGraph.isIE8()) { |
---|
66 | tooltipFunc = function (i) |
---|
67 | { |
---|
68 | var r = i % 4; |
---|
69 | |
---|
70 | if (r == 3) return 'John' |
---|
71 | else if (r == 2) return 'Rich'; |
---|
72 | else if (r == 1) return 'Jane'; |
---|
73 | else if (r == 0) return 'Quentin'; |
---|
74 | } |
---|
75 | bar2.Set('chart.tooltips', tooltipFunc); |
---|
76 | } |
---|
77 | |
---|
78 | bar2.Draw(); |
---|
79 | |
---|
80 | } |
---|
81 | </script> |
---|
82 | |
---|
83 | <title> |
---|
84 | Dashboard Graph Selection |
---|
85 | </title> |
---|
86 | <?php new Stylesheet("visualEditors"); ?> |
---|
87 | |
---|
88 | </head> |
---|
89 | |
---|
90 | <body> |
---|
91 | <div id="header"> |
---|
92 | |
---|
93 | </div> |
---|
94 | |
---|
95 | |
---|
96 | <div |
---|
97 | <div id="breadcrumbs"> |
---|
98 | <?php |
---|
99 | $pagetitle = "Dashboard Graph Selection"; |
---|
100 | include("breadcrumbs.php"); |
---|
101 | ?> |
---|
102 | </div> |
---|
103 | |
---|
104 | |
---|
105 | <div id="content"> |
---|
106 | <div id="wrapper"> |
---|
107 | |
---|
108 | <div id="leftColumn"> |
---|
109 | |
---|
110 | <div class="largeFrame C" id="dbDataSelector"> |
---|
111 | <div class="content"> |
---|
112 | |
---|
113 | <div class="largeTitle">Selected data</div> |
---|
114 | <div class="content" style="width: 300px; height: 500px; "> |
---|
115 | |
---|
116 | <?php |
---|
117 | print_r($data); |
---|
118 | ?> |
---|
119 | |
---|
120 | </div> |
---|
121 | |
---|
122 | </div> |
---|
123 | </div> |
---|
124 | </div> |
---|
125 | |
---|
126 | <div id="rightColumn"> |
---|
127 | <div class="largeFrame Cv" style="width: 600px; height: 400px;"> |
---|
128 | <div class="largeTitle">Graph selection</div> |
---|
129 | <div class="topControls" id="graphTypeSelector" style="float: left; clear: left; width: 100%; margin: 0; border: 1px solid #000;"> |
---|
130 | <div id="btnSelectPieType" class="graphSelectionButton" onclick="changeGraphType('pie')">PIE CHART</div> |
---|
131 | <div id="btnSelectBarType" class="graphSelectionButton" onclick="changeGraphType('bar')">BAR CHART</div> |
---|
132 | <div id="btnSelectRadarType" class="graphSelectionButton" onclick="changeGraphType('radar')">RADAR CHART</div> |
---|
133 | </div> |
---|
134 | <div class="content" id="graphDisplay"> |
---|
135 | |
---|
136 | <canvas id="chart1" width="450" height="200" onclick="RGraph.showPNG(document.getElementById('bar1'));">[No canvas support] </canvas> |
---|
137 | |
---|
138 | <!-- Button to gotoDashboard?? --> |
---|
139 | |
---|
140 | </div> |
---|
141 | |
---|
142 | <div class="controls"> |
---|
143 | <input type="button" class="smallButton" value="Save to dashboard" onClick="addToDashboard()"></input> |
---|
144 | <input type="button" class="smallButton" value="Go to Dashboard" onClick="gotoDashboard()"></input> |
---|
145 | |
---|
146 | </div> |
---|
147 | |
---|
148 | </div> |
---|
149 | </div> |
---|
150 | |
---|
151 | |
---|
152 | <div class="largeFrame Cu" id="dbInfoPanel" style="width: 930px;"> |
---|
153 | <div class='largeTitle'>Info panel</div> |
---|
154 | <div class="content" id="dbInfoPanelContent" style="height: 100px;"> |
---|
155 | |
---|
156 | </div> |
---|
157 | |
---|
158 | |
---|
159 | </div> |
---|
160 | </div> |
---|
161 | |
---|
162 | |
---|
163 | |
---|
164 | </body> |
---|
165 | </html> |
---|