source: Dev/branches/Cartis/dashboardOverview.php @ 278

Last change on this file since 278 was 277, checked in by tjcschipper, 13 years ago
File size: 4.0 KB
Line 
1<?php
2require "classes/master.php";
3
4//var_dump(JSON_decode($_POST['doorstuurData']));
5$dataIn = $_POST['doorstuurData'];
6?>
7
8<html>
9    <head>
10        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
11
12
13        <script src="js/generalScripts.js" ></script>
14        <script src="js/dashboardScripts.js" ></script>
15        <script src="RGraph/libraries/RGraph.common.core.js" ></script>
16        <script src="RGraph/libraries/RGraph.common.annotate.js" ></script>
17        <script src="RGraph/libraries/RGraph.common.context.js" ></script>
18
19        <script src="RGraph/libraries/RGraph.common.tooltips.js" ></script>
20        <script src="RGraph/libraries/RGraph.common.resizing.js" ></script>
21        <script src="RGraph/libraries/RGraph.bar.js" ></script>
22        <script src="RGraph/libraries/RGraph.radar.js" ></script>
23        <script src="RGraph/libraries/RGraph.pie.js" ></script>
24        <script src="rGraph/libraries/RGraph.rose.js"></script>
25
26
27        <script>
28            window.onload = function ()
29            {
30                debugger;
31                var dataIn = ge("inputDataField").value;
32                var inputData = JSON.parse(dataIn);
33               
34                window.charts = [];
35               
36                for (var n = 0; n < inputData.count; n++) {
37                    var name = inputData.graphs[n][0];
38                    var chart = drawGraph(name, inputData.graphs[n][1], inputData.graphs[n][2], inputData.graphs[n][3], inputData.graphs[n][4]);
39                    charts.push(chart);
40                }
41               
42                var el = ce("div");
43                el.className = "floatClearer";
44                ge("graphDisplay").appendChild(el);
45                /*
46                for (var n = 0; n < window.charts.length; n++) {
47                    // set context menu
48                    charts[n].Set('chart.contextmenu', [
49                        ['View graph fullscreen', RGraph.showPNG],
50                        null,
51                        ['Cancel', function() {}]
52                    ]);
53                }
54                 */
55               debugger;
56                var canvases = document.getElementsByTagName("canvas");
57                for (var n = 0; n < canvases.length; n++) {
58                    canvases[n].addEventListener("click", function(event) {
59                        debugger;
60                        RGraph.showPNG(event.target, event);
61                        //var div = ge("__rgraph_image_div__");
62                        //div.style.width = "800px";
63                        //div.style.height = "600px";
64                        //var img = ge("__rgraph_image_img__");
65                        //img.style.width = "800px";
66                        //img.style.height = "600px";
67                    }, true);
68                }
69               
70            }
71        </script>
72        <title>Dashboard Overview</title>
73        <?php new Stylesheet("visualEditors"); ?>
74    </head>
75    <body>
76
77        <div id="header">
78            <?php new Logo(); ?>
79        </div>
80
81        <div id="content">
82            <div id="wrapper">
83
84                <div id="breadcrumbs" class="largeFrame" style="width: 900px;">
85                    <a href="#" onclick="checkBack('index.php');">Login</a> >
86                    <a href="#" onclick="checkBack('dashboardDataSelection.php');">Select data</a> >
87                    <a href="#" onclick="checkBack('dashboardDataSelection.php');">Select graphtype</a>
88                    <a href="#" class="selected">Dashboard Overview</a>
89                </div>
90
91                <div id="leftColumn">
92
93                    <div class="largeFrame C" style="height: auto; max-height: none;">
94
95                        <div class="largeTitle">Dashboard Overview</div>                         
96                        <div class="content" id="graphDisplay">
97
98                            <input type="hidden" id="inputDataField" value='<?php echo $dataIn; ?>'
99
100
101                        </div>
102
103                    </div>
104                </div>
105
106
107            </div>
108
109
110        </div>
111    </div>
112
113</body>
114
115</html>
Note: See TracBrowser for help on using the repository browser.