Index: Dev/branches/Cartis/Tiles preview/Tests/css/style.css
===================================================================
--- Dev/branches/Cartis/Tiles preview/Tests/css/style.css	(revision 276)
+++ Dev/branches/Cartis/Tiles preview/Tests/css/style.css	(revision 276)
@@ -0,0 +1,164 @@
+/* http://meyerweb.com/eric/tools/css/reset/ 
+   v2.0 | 20110126
+   License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed, 
+figure, figcaption, footer, header, hgroup, 
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+    margin: 0;
+    padding: 0;
+    border: 0;
+    font-size: 100%;
+    font: inherit;
+    vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure, 
+footer, header, hgroup, menu, nav, section {
+    display: block;
+}
+body {
+    line-height: 1;
+}
+ol, ul {
+    list-style: none;
+}
+blockquote, q {
+    quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+    content: '';
+    content: none;
+}
+table {
+    border-collapse: collapse;
+    border-spacing: 0;
+}
+
+/* 232F38  dark, 3c4853   light */
+
+root { 
+    display: block;
+}
+
+.subcatHeader {
+    width: 600px;
+    height: 30px;
+    background-color: #3c4853  ;
+    margin: 0 5px;
+    padding: 0;
+    border: none;
+    float: left;
+    clear: both;
+    border-bottom: 1px solid #606c78;
+    -webkit-user-select: none;
+}
+
+.subcatTitle {
+    font-size: 16px;
+    font-weight: bold;
+    display: block;
+    margin: 0 0 0 5px;
+    padding: 0 5px;
+    background-color: #232F38 ;
+    width: 200px;
+    line-height: 30px;
+    float: left;
+}
+
+.questionTitle {
+    font-size: 14px;
+    font-weight: normal;
+    /*font-style: italic;*/
+    line-height: 25px;
+    float: left;
+    clear: none;
+    width: 200px; 
+}
+
+.subcatContainer .questionTitle {
+    width: 350px;
+}
+
+.subcatHeader .questionDisplay {
+    width: 352px;
+    height: 24px;
+    padding: 3px 0 3px 3px;
+    float: left;
+    user-select: none; 
+}
+
+.questionDisplay {
+    height: 30px;
+    width: 600px;
+}
+
+.subcatContainer {
+    float: left;
+    clear: left;
+    width: 600px;
+    padding: 0;
+    margin: 0 5px;
+    background-color: #606c78;
+    height: auto;
+}
+
+.collapsed {
+    height: 0;
+    overflow: hidden;
+}
+
+.left {
+    float: left;
+}
+
+.right {
+    float: right;
+}
+
+.icon_small {
+    width: 25px;
+    height: 25px;
+    margin-right: 3px;
+    border: none;
+    clear: none;
+}
+
+.arrowIcon {
+    width: 30px;
+    height: 25px;
+    padding: 3px 0 2px 0;
+    float: right;
+    clear: none;
+    background-color: #232F38 ;
+}
+
+.smallButton {
+    background-color: transparent;
+    font-weight: bold;
+    line-height: 30px;
+    height: 30px;
+    min-width: 30px;
+    margin: -3px 0 0 0;
+    padding: 0 5px;
+    color: #D9C8A2;
+    background-color: #606c78;
+    -webkit-user-select: none;
+    cursor: default;
+}
+
+.smallButton:hover {
+    background-color: #EB6C2D  ;
+}
Index: Dev/branches/Cartis/Tiles preview/Tests/js/menu.js
===================================================================
--- Dev/branches/Cartis/Tiles preview/Tests/js/menu.js	(revision 276)
+++ Dev/branches/Cartis/Tiles preview/Tests/js/menu.js	(revision 276)
@@ -0,0 +1,152 @@
+(function(){
+        
+    function QuestionMenu() {
+        
+        var self = this;
+        var _element;
+       
+        this.init = function() {
+            if (self._element == null || self._element == undefined) {
+                self._element = $("<div>").attr("id","menuContainer");
+                $("#content").append(self._element);
+            }
+        };
+        this.init();
+        
+        this.loadContents = function (data) {
+            // IN this function we are going to load the mock database, and create instances of the various classes where appropriate, then initialize them.
+            var _subcatCount = 0;
+            for (var key in data) {
+                if (!(data[key] instanceof Function)) {
+                    // This is a subcat!!
+                    debugger;
+                    var subcat = new Subcat(key);
+                    var header = new SubcatHeader(key);
+                    // Add a header
+                    subcat.addHeader(header);
+                    self._element.append(subcat.header().element());
+                    for (var n = 0; n < data[key].length; n++) {
+                        //Add question displays to the subcat container
+                        var qData = data[key][n];
+                        var question = new Question(qData.text, qData.type, qData.uid);
+                        var display = new QuestionDisplay(question, true); // True means full mode, for display in menu, not in header.
+                        subcat.addDisplay(display);
+                    }
+                    self._element.append(subcat.element());
+                }
+            }   
+        }
+    }
+    window.QuestionMenu = QuestionMenu;
+    
+    
+    function Subcat(title) {
+        var self = this;
+        var _title, _displays, _header, _containerElement;
+        
+        this.init = function(title){
+            self._title = title;
+            self._displays = [];
+            self._containerElement = $("<div>").attr("id", "subcat_"+title).addClass("subcatContainer collapsed");
+        };
+        self.init(title);
+        
+        this.addDisplay = function(display) {
+            self._displays.push(display);
+            self._containerElement.append(display.element());
+        }
+        
+        this.addHeader = function(header) {
+            self._header = header;
+        }
+        
+        this.element = function() {
+            return self._containerElement;
+        }
+        
+        this.header = function() {
+            return self._header;
+        }
+    }
+    window.Subcat = Subcat;
+    
+    function SubcatHeader(title) {
+        var _element;
+        var self = this;
+        var _title = title;
+        var _template = '<p class="subcatTitle">_TITLE</p><div class="questionDisplay"><img class="icon_small left" src="images/questionIconS3.png"/><span class="questionTitle">_QTITLE</span><div class="smallButton right">Add ></div><img class="icon_small right" src="images/inspectIconS.png"/></div><img class="arrowIcon open" src="images/arrow_closed.png"/>';
+        
+        this.init = function(id) {
+            var markup = _template;
+            markup = markup.replace("_TITLE", _title);
+            markup = markup.replace("_QTITLE", "derpaderp");
+            self._element = $("<div>").addClass("subcatHeader").attr("id", "subcatHeader_"+id).html(markup);
+            self._element.children().filter(".arrowIcon").bind("click", self.toggleState);
+        };
+        
+        
+        this.element = function () {
+            return self._element;
+        }
+        
+        this.toggleState = function(event) {
+            debugger;
+            var id = event.target.parentNode.id.toString().split("subcatHeader_")[1];
+            var el = $("#subcat_"+id);
+            if (el.hasClass("collapsed")) el.removeClass("collapsed").addClass("open");
+            else if (el.hasClass("open")) el.removeClass("open").addClass("collapsed");
+        }
+        self.init(_title);    
+    }
+    window.SubcatHeader = SubcatHeader;
+   
+    function Question(text, type, uid) {
+        var self = this;
+        var _uid;
+        var _text;
+        var _type;
+        
+        this.init = function(text, type, uid) {
+            self._text = text;
+            self._type = type;
+            self._uid = uid;
+        }
+        self.init(text, type, uid);
+        
+        this.getUid = function() {
+            return self._uid;
+        }
+        this.getText = function() {
+            return self._text;
+        }
+        
+        this.getType = function() {
+            return self._type;
+        }
+    }
+    window.Question = Question;
+   
+    function QuestionDisplay(question, fullMode) {
+        var self = this;
+        var _fullMode, _question, _element;
+        var _template = '<img class="icon_small left" src="images/questionIconS3.png"/><span class="questionTitle">_TITLE</span><span class="questionAnswers">_ANSWERS</span><img class="icon_small right" src="images/inspectIconS.png"/>';
+        
+        this.init = function(q, fM) {
+            debugger;
+            self._question = q;
+            self._fullMode = fM;
+            var markup = _template;
+            markup = markup.replace("_TITLE", self._question._text);
+            markup = markup.replace("_ANSWERS", "802 answers");
+            self._element = $("<div>").attr("id", question.getUid()).addClass("questionDisplay").html(markup);
+        };
+        self.init(question, fullMode);
+        
+        this.element = function() {
+            return self._element;
+        }
+    }
+    window.QuestionDisplay = QuestionDisplay;
+
+
+})();
Index: Dev/branches/Cartis/Tiles preview/Tests/js/testscript1.js
===================================================================
--- Dev/branches/Cartis/Tiles preview/Tests/js/testscript1.js	(revision 276)
+++ Dev/branches/Cartis/Tiles preview/Tests/js/testscript1.js	(revision 276)
@@ -0,0 +1,36 @@
+$(function() {
+    
+    var mockData = {
+        age: [
+        {
+            text: "What is your age?",
+            type: "Number",
+            uid: "12345"
+        },
+        {
+            text: "Enter your birthdate",
+            type: "Date",
+            uid: "abcdefgh"
+        }
+        ],
+        gender: [
+        {
+            text: "Are you male or female?",
+            type: "Choice",
+            uid: "1337"
+        },
+        {
+            text: "Please choose your sex.",
+            type: "Choice",
+            uid: "65516551"
+        }
+        ]
+    };
+    
+    $(function initMenu() {
+        window.questionMenu = new QuestionMenu();
+        questionMenu.loadContents(mockData);
+    });
+    
+    
+})
Index: Dev/branches/Cartis/Tiles preview/Tests/menuTest.html
===================================================================
--- Dev/branches/Cartis/Tiles preview/Tests/menuTest.html	(revision 276)
+++ Dev/branches/Cartis/Tiles preview/Tests/menuTest.html	(revision 276)
@@ -0,0 +1,20 @@
+<!--
+To change this template, choose Tools | Templates
+and open the template in the editor.
+-->
+<!DOCTYPE html>
+<html>
+    <head>
+        <title></title>
+        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+        <script src="../js/jquery.js"></script>
+        <script src="js/menu.js"></script>
+        <script src="js/testscript1.js"></script>
+        
+        <link rel="stylesheet" type="text/css" href="css/style.css"/>
+    </head>
+    <body>
+        <div id="content">
+        </div>
+    </body>
+</html>
Index: Dev/branches/Cartis/css/visualeditors.css
===================================================================
--- Dev/branches/Cartis/css/visualeditors.css	(revision 275)
+++ Dev/branches/Cartis/css/visualeditors.css	(revision 276)
@@ -24,6 +24,5 @@
 
 #wrapper {
-    width: 80%;
-    min-width: 800px;
+    width: 960px;
     margin: 0 auto;
 }
@@ -506,6 +505,21 @@
 
 #breadcrumbs {
+    font-size: 14px;
+    color: #fff;
+    margin: 0 10px;
+    padding: 5px 20px;
+    width: 88%;
+}
+
+#breadcrumbs a {
+    text-decoration: none;
+    color: #fff;
+}
+
+#breadcrumbs a:hover {
+    color: #367ac3;
+}
+
+#breadcrumbs a.selected {
     text-decoration: underline;
-    font-size: 50px;
-    font-family: monospace;
-}
+}
Index: Dev/branches/Cartis/dashboardDataSelection.php
===================================================================
--- Dev/branches/Cartis/dashboardDataSelection.php	(revision 275)
+++ Dev/branches/Cartis/dashboardDataSelection.php	(revision 276)
@@ -24,75 +24,80 @@
     </head>
     <body>
-        </div>
+    </div>
 
-            <div id="header">
-                
+    <div id="header">
+
+    </div>
+
+    <div id="content">
+        <div id="wrapper">
+
+            <div id="breadcrumbs" class="largeFrame">
+                <a href="#">Login</a> > 
+                <a href="dashboardDataSelection.php" class="selected">Select data</a>
             </div>
 
-            <div id="content">
-                <div id="wrapper">
+            <div id="leftColumn">
 
-                    <div id="leftColumn">
+                <div class="largeFrame C" id="dbDataSelector">
+                    <div class="content">
 
-                        <div class="largeFrame C" id="dbDataSelector">
-                            <div class="content">
+                        <div style="float: left; clear: none;">
+                            <div class="largeTitle">Instance data</div>
+                            <select id="dbSessionInstancesList" multiple class="dbDataList" size="15" onchange="infoPanelTimeout(event);">
 
-                                <div style="float: left; clear: none;">
-                                    <div class="largeTitle">Instance data</div>
-                                    <select id="dbSessionInstancesList" multiple class="dbDataList" size="15" onchange="infoPanelTimeout(event);">
-
-                                        <?php
-                                        //Changed sessions into questions
-                                        // foreach ($dbDataSelectionWidget->survey as $question) {
-                                        foreach ($dbDataSelectionWidget->sessions as $session) {
-                                            // Fill list
-                                            // First checkbox, then descriptor
-                                            echo "<option value='$session->uid'>$session->title</option>";
-                                        }
-                                        ?>
-                                    </select>
-                                </div>
-
-                                <div style="float: left; clear:none;">
-                                    <div class="largeTitle">Game data</div>
-                                    <select id="dbGamedataList" multiple class="dbDataList" size="15" onChange="infoPanelTimeout(event);">
-                                        <?php
-                                        foreach ($dbDataSelectionWidget->gamedata as $gamedata) {
-                                            // Fill list
-                                            // First checkbox, then descriptor
-                                            echo "<option value='$gamedata->uid'>$gamedata->title</option>";
-                                        }
-                                        ?>
-                                    </select>
-                                </div>
-                            </div>
+                                <?php
+                                //Changed sessions into questions
+                                // foreach ($dbDataSelectionWidget->survey as $question) {
+                                foreach ($dbDataSelectionWidget->sessions as $session) {
+                                    // Fill list
+                                    // First checkbox, then descriptor
+                                    echo "<option value='$session->uid'>$session->title</option>";
+                                }
+                                ?>
+                            </select>
                         </div>
 
-
-                        <div class="largeFrame Cu" id="dbInfoPanel">
-                            <div class='largeTitle'>Info panel</div>
-                            <div class="content" id="dbInfoPanelContent" style="height: 100px;">
-
-                            </div>
-
-                            <div class="controls">
-                                <input type="button" class="smallButton" id="btnAddToCart" value="Add to list" onClick="addDataToList();" />
-                            </div>
-                        </div>
-                    </div>
-
-                    <div id="rightColumn">
-                        <div class="largeFrame Cv" id="dbShoppingCart">
-                            <div class="largeTitle">Selected data</div>
-                            <div class="content" id="shoppingCartContent">
-
-                            </div>
-                            <div class="controls">
-                                <input type="button" class="smallButton" id="btnAddToCart" value="Configure Dashboard" onClick="configureDashboard();" />
-                            </div>
+                        <div style="float: left; clear:none;">
+                            <div class="largeTitle">Game data</div>
+                            <select id="dbGamedataList" multiple class="dbDataList" size="15" onChange="infoPanelTimeout(event);">
+                                <?php
+                                foreach ($dbDataSelectionWidget->gamedata as $gamedata) {
+                                    // Fill list
+                                    // First checkbox, then descriptor
+                                    echo "<option value='$gamedata->uid'>$gamedata->title</option>";
+                                }
+                                ?>
+                            </select>
                         </div>
                     </div>
                 </div>
+
+
+                <div class="largeFrame Cu" id="dbInfoPanel">
+                    <div class='largeTitle'>Info panel</div>
+                    <div class="content" id="dbInfoPanelContent" style="height: 100px;">
+
+                    </div>
+
+                    <div class="controls">
+                        <input type="button" class="smallButton" id="btnAddToCart" value="Add to list" onClick="addDataToList();" />
+                    </div>
+                </div>
             </div>
-    </body>
+
+            <div id="rightColumn">
+                <div class="largeFrame Cv" id="dbShoppingCart">
+                    <div class="largeTitle">Selected data</div>
+                    <div class="content" id="shoppingCartContent">
+
+                    </div>
+                    <div class="controls">
+                        <input type="button" class="smallButton" id="btnAddToCart" value="Configure Dashboard" onClick="configureDashboard();" />
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</body>
 </html>
Index: Dev/branches/Cartis/dashboardGraphSelection.php
===================================================================
--- Dev/branches/Cartis/dashboardGraphSelection.php	(revision 275)
+++ Dev/branches/Cartis/dashboardGraphSelection.php	(revision 276)
@@ -27,6 +27,12 @@
         <script src="RGraph/libraries/RGraph.pie.js" ></script> 
         <script src="RGraph/libraries/RGraph.radar.js" ></script> 
+        <script src="RGraph/libraries/RGraph.rose.js" ></script> 
 
 
+
+
+
+
+        
         <script>
             myGraph.Set('chart.contextmenu', [
@@ -36,50 +42,4 @@
             ]);
         </script>
-
-
-        <script>
-            window.onload = function ()
-            {
- 
-                var bar1 = new RGraph.Bar('chart1', mockupData.muData3);
-                //bar1.Set('chart.background.barcolor1', 'white');
-                // bar1.Set('chart.background.barcolor2', 'white');
-                bar1.Set('chart.labels', ['1st', '2nd', '3rd', '4th', '5th', '6th']);
-                bar1.Set('chart.key', ['John', 'Bob']);
-                bar1.Set('chart.key.position.y', 35);
-                bar1.Set('chart.key.position', 'gutter');
-                bar1.Set('chart.key.background', 'rgb(255,255,255)');
-                bar1.Set('chart.colors', ['#77f', '#7f7']);
-                bar1.Set('chart.shadow', true);
-                bar1.Set('chart.shadow.blur', 15);
-                bar1.Set('chart.shadow.offsetx', 0);
-                bar1.Set('chart.shadow.offsety', 0);
-                bar1.Set('chart.shadow.color', '#aaa');
-                bar1.Set('chart.yaxispos', 'right');
-                bar1.Set('chart.strokestyle', 'rgba(0,0,0,0)');
-                bar1.Set('chart.gutter.left', 5);
-                bar1.Set('chart.gutter.right', 45);
-                bar1.Draw();
- 
-                
-            
-                if (!RGraph.isIE8()) {
-                    tooltipFunc = function (i)
-                    {
-                        var r = i % 4;
-                    
-                        if (r == 3) return 'John'
-                        else if (r == 2) return 'Rich';
-                        else if (r == 1) return 'Jane';
-                        else if (r == 0) return 'Quentin';
-                    }
-                    bar2.Set('chart.tooltips', tooltipFunc);
-                }
- 
-                bar2.Draw();
-                
-            }
-        </script> 
-        
 
         <title>
@@ -100,4 +60,10 @@
                 <div id="wrapper">
 
+                    <div id="breadcrumbs" class="largeFrame" style="width: 900px;">
+                        <a href="#" onclick="checkBack('index.php');">Login</a> > 
+                        <a href="#" onclick="checkBack('dashboardDataSelection.php');">Select data</a> > 
+                        <a href="#" class="selected">Select graphtype</a>
+                    </div>
+
                     <div id="leftColumn">
 
@@ -106,10 +72,15 @@
 
                                 <div class="largeTitle">Selected data</div>                         
-                                <div class="content" style="width: 300px; height: 500px; ">                
+                                <div class="content" style="width: 296px; height: 500px; ">                
+                                    <select id="dbSelectedData" multiple class="dbDataList" size="15" style="width: 275px;" onchange="infoPanelTimeout(event);">
 
-                                    <?php
-                                    print_r($data);
-                                    ?> 
+                                        <?php
+                                        $objCount = count($data->contents->titles);
 
+                                        for ($i = 0; $i < $objCount; $i++) {
+                                            echo "<option value='" . $data->contents->uids[$i] . "' name='" . $data->contents->types[$i] . "'>" . $data->contents->titles[$i] . "</option>";
+                                        }
+                                        ?>
+                                    </select>
                                 </div>
 
@@ -125,9 +96,11 @@
                                 <div id="btnSelectBarType" class="graphSelectionButton" onclick="changeGraphType('bar')">BAR CHART</div>
                                 <div id="btnSelectRadarType" class="graphSelectionButton" onclick="changeGraphType('radar')">RADAR CHART</div>
+                                <div id="btnSelectRose" class="graphSelectionButton" onClick="changeGraphType('rose')">ROSE CHART</div>
+
                             </div>
                             <div class="content" id="graphDisplay">
 
                                 <canvas id="chart1" width="450" height="200" onclick="RGraph.showPNG(document.getElementById('radar1'));">[No canvas support] </canvas> 
-                              
+
                                 <!-- Button to gotoDashboard?? -->                                                            
 
@@ -137,5 +110,5 @@
                                 <input type="button" class="smallButton" value="Save to dashboard" onClick="addToDashboard()"></input>
                                 <input type="button" class="smallButton" value="Go to Dashboard" onClick="gotoDashboard()"></input>
-                                
+
 
                             </div>
Index: Dev/branches/Cartis/dashboardOverview.php
===================================================================
--- Dev/branches/Cartis/dashboardOverview.php	(revision 275)
+++ Dev/branches/Cartis/dashboardOverview.php	(revision 276)
@@ -22,4 +22,5 @@
         <script src="RGraph/libraries/RGraph.radar.js" ></script>
         <script src="RGraph/libraries/RGraph.pie.js" ></script>
+        <script src="rGraph/libraries/RGraph.rose.js"></script>
 
         <script>
@@ -44,12 +45,9 @@
             }
         </script> 
-
-
-
         <title>Dashboard Overview</title>
         <?php new Stylesheet("visualEditors"); ?>
     </head>
     <body>
-        
+
         <div id="header">
             <?php new Logo(); ?>
@@ -59,4 +57,11 @@
             <div id="wrapper">
 
+                <div id="breadcrumbs" class="largeFrame" style="width: 900px;">
+                    <a href="#" onclick="checkBack('index.php');">Login</a> > 
+                    <a href="#" onclick="checkBack('dashboardDataSelection.php');">Select data</a> > 
+                    <a href="#" onclick="checkBack('dashboardDataSelection.php');">Select graphtype</a>
+                    <a href="#" class="selected">Dashboard Overview</a>
+                </div>
+
                 <div id="leftColumn">
 
@@ -65,7 +70,7 @@
                         <div class="largeTitle">Dashboard Overview</div>                         
                         <div class="content" id="graphDisplay">
-                            
+
                             <input type="hidden" id="inputDataField" value='<?php echo $dataIn; ?>'
-                            
+
 
                         </div>
Index: Dev/branches/Cartis/js/dashboardScripts.js
===================================================================
--- Dev/branches/Cartis/js/dashboardScripts.js	(revision 275)
+++ Dev/branches/Cartis/js/dashboardScripts.js	(revision 276)
@@ -22,6 +22,7 @@
 var mockupData = {
     muData1: [1,2,3,4,5,6], //pie charts
-    muData2: [[1,2,3],[4,5,6]], //bar charts
-    muData3: [[1,2],[3,4],[5,6]]    //radar charts
+    muData2: [[1,7],[4,2],[9,6]], //bar charts
+    muData3: [6,8,7,5,9,7,6,4],    //radar charts
+    muData4 : [8,34,6,56,3,23] // rose charts
 }
 
@@ -40,4 +41,5 @@
     var uid = values[values.length-1];
     var type;
+    
     switch (selectBox.id) {
         case "dbSessionInstancesList":
@@ -50,5 +52,13 @@
             break;
         default:
-            alert("No valid type passed!");
+            var value = values[0];
+            var opt;
+            for (var n = 0; n < selectBox.options.length; n++) {
+                if (selectBox.options[n].value == value) {
+                    opt = selectBox.options[n];
+                    type = opt.attributes[1].value;
+                }
+            }
+            if (type == null || type == undefined) //error?!?!?!
             break;
     }
@@ -208,5 +218,5 @@
     form.appendChild(input);
     form.submit();
-    //alert("Graph type is now: "+graphSelection);
+//alert("Graph type is now: "+graphSelection);
     
 }
@@ -225,4 +235,7 @@
             graphSelection.graphType = "Pie";
             break;
+        case "rose":
+            graphSelection.graphType = "Rose";
+            break;
         default:
             break;
@@ -233,5 +246,5 @@
     drawGraph('chart1', 450, 200, graphSelection.graphType, data);
     
-   // alert("Graph type is now: "+graphSelection.graphType);
+// alert("Graph type is now: "+graphSelection.graphType);
 }
 
@@ -247,8 +260,23 @@
      */
     // temporary!!!;
-    graphSelection.graphData = mockupData.muData1;
-    return mockupData.muData1;
-    
-    //alert("Data is now being formatted");
+    
+    switch (graphSelection.graphType) {
+        case "Bar":
+            graphSelection.graphData = mockupData.muData2;
+            break;
+        case "Pie":
+            graphSelection.graphData = mockupData.muData1;
+            break;
+        case "Radar":
+            graphSelection.graphData = mockupData.muData3;
+            break;
+        case "Rose":
+            graphSelection.graphData = mockupData.muData4;
+            break;
+    }
+    
+    return graphSelection.graphData;
+    
+//alert("Data is now being formatted");
 }
 
@@ -271,25 +299,30 @@
         case "Bar":
             chart1 = new RGraph.Bar(name, data);
+            chart1.Set('chart.labels', ['1 fault', '2 faults', '3 faults', '4 faults', '5 faults', '6 faults']);
+            chart1.Set('chart.colors', ['#77f', '#7f7', '#f77']);
             break;
         case "Pie":
             chart1 = new RGraph.Pie(name, data);
+            chart1.Set('chart.labels', ['1 fault', '2 faults', '3 faults', '4 faults', '5 faults', '6 faults']);
+            chart1.Set('chart.colors', ['#77f', '#7f7', '#f77']);
             break;
         case "Radar":
             chart1 = new RGraph.Radar(name, data);
-            break;
-        default:
-            break;
-    }
-    
-    //chart1.Set('chart.background.barcolor1', 'white');
-    // chart1.Set('chart.background.barcolor2', 'white');
-    chart1.Set('chart.labels', ['1st', '2nd', '3rd', '4th', '5th', '6th']);
-    //chart1.Set('chart.key', ['Aapjes', 'Hertjes']);
-    //chart1.Set('chart.key.position.y', 35);
-    //chart1.Set('chart.key.position', 'gutter');
-    //chart1.Set('chart.key.background', 'rgb(255,255,255)');
-    chart1.Set('chart.colors', ['#77f', '#7f7']);
-    chart1.Set('chart.shadow', true);
-    chart1.Set('chart.shadow.blur', 15);
+            chart1.Set('chart.colors.alpha', '50%');
+            chart1.Set('chart.colors', ['rgba(112,112,240,0.5)', 'rgba(112,240,112,0.5)', 'rgba(240,112,112,0.5)']);
+            break;
+        case "Rose":
+            chart1 = new RGraph.Rose(name, data);
+            chart1.Set('chart.labels', ['1 fault', '2 faults', '3 faults', '4 faults', '5 faults', '6 faults']);
+            chart1.Set('chart.colors', ['#77f', '#7f7', '#f77']);
+            break;
+        default:
+            break;
+    }
+    
+    
+    
+    chart1.Set('chart.shadow', false);
+    chart1.Set('chart.shadow.blur', 0);
     chart1.Set('chart.shadow.offsetx', 0);
     chart1.Set('chart.shadow.offsety', 0);
@@ -308,6 +341,17 @@
 }
 
+
+
 function addToDashboard() {
+    alert('You saved "'+graphSelection.graphType.toLowerCase()+' chart" to dashboard!');    
     doorstuurData.graphs.push(["graph"+doorstuurData.count+1, 450, 200, graphSelection.graphType, graphSelection.graphData]);
     doorstuurData.count++;
 }
+//Helper
+
+function checkBack(url) {
+    if (confirm("Are you sure you want to go back? You will lose your selected data.")) {
+        window.location = url ;
+    }
+}
+
