Ignore:
Timestamp:
02/29/12 16:32:21 (13 years ago)
Author:
cartis
Message:

klaar voor testing

Location:
Dev/branches/Cartis/Tiles preview/js
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/Cartis/Tiles preview/js/classes/graphs.js

    r290 r296  
    1010        var _data;
    1111        var _graphObject;
     12        var _title;
    1213        this._container = document.getElementById(containerName);
    1314       
    14         this.init = function(id, data, type, size) {
     15        this.init = function(id, data, type, size, title) {
    1516            // Draw the graph to the element
    1617            _id = id;
     
    1819            _type = type;
    1920            _size = size;
     21            if (title) _title = title;
    2022
    2123            var canvas = document.createElement("canvas");
     
    2830            switch (_type) {
    2931                case "Pie":
     32                    // Hardcoded data
     33                    // Participant age
     34                    _data = [5,7,9,4];
    3035                    _graphObject = new RGraph.Pie(_id, _data);
     36                    _graphObject.Set('chart.labels', ['20-30 (20 participants)', '30-40 (28 participants)', '40-50 (36 participants)', '50+ (16 participants)']);
     37                    _graphObject.Set('chart.text.color', '#fff');
    3138                    break;
    3239                case "Bar":
     40                    // Hardcoded data
     41                    // Quality of control
     42                    _data = [4,20,50,18,8];
    3343                    _graphObject = new RGraph.Bar(_id, _data);
    34                     _graphObject.Set('chart.labels', ['Jan', 'Piet', 'Shaniqua']);
     44                    _graphObject.Set('chart.labels', ['Bad','Subpar','Average','Above average','Good']);
     45                    _graphObject.Set('chart.text.color', '#fff');
    3546                    break;
    3647                case "Radar":
    37                     _graphObject = new RGraph.Radar(_id, _data);
     48                    //Hardcoded data
     49                    // Gameplay errors
     50                    _data = [24,20,26,35,36,29,25,16];
     51                    _graphObject = new RGraph.Radar(_id, _data);                                 
     52                    _graphObject.Set('chart.labels',['Bram','Paula','Jules','Joel','Tyrone','Henk','Darcy','Frans']);
     53                    _graphObject.Set('chart.text.color', '#000');
     54                    _graphObject.Set('chart.strokestyle','black');
     55
    3856                    break;
    3957                case "Rose":
    4058                    _graphObject = new RGraph.Rose(_id, _data);
     59                    _graphObject.Set('chart.text.color', '#000');
    4160                    break;
    4261            }
    4362           
    4463            // Set standard properties.
    45             _graphObject.Set('chart.text.color', '#fff');
    4664            _graphObject.Set('chart.shadow', false);
    4765            _graphObject.Set('chart.colors', ['rgba(240,240,240,0.5)', 'rgba(240,240,240,0.5)', 'rgba(240,240,240,0.5)']);
    4866            _graphObject.Set('chart.axis.color', 'rgba(240,240,240,0.5)');
    4967            _graphObject.Set('chart.strokestyle', 'rgba(240,240,240,1.0)');
     68            if (title) {
     69                _graphObject.Set('chart.title', title);
     70                _graphObject.Set('chart.title.color', 'white');
     71            }
    5072           
    5173            //enlarge click event
     
    91113            */
    92114            var largeGraph = new Graph("largeContainer");
    93             largeGraph.init("enlarged", _data, _type, [900,550]);
     115            largeGraph.init("enlarged", _data, _type, [900,550], _title);
    94116            var clearDiv = document.createElement("div");
    95117            $(clearDiv).css("float", "left").css("clear", "both");
  • Dev/branches/Cartis/Tiles preview/js/dashboardScripts.js

    r290 r296  
    2121
    2222var mockupData = {
    23     muData1: [1,2,3,4,5,6], //pie charts
    24     muData2: [[1,2,3],[4,5,6]], //bar charts
    25     muData3: [[1,2],[3,4],[5,6]]    //radar charts
     23    muData1: [1,3,5,6,12,6], //pie charts
     24    muData2: [[4,12,6],[2,6,15]], //bar charts
     25    muData3: [[55,42],[3,4],[5,6]]    //radar charts
    2626}
    2727
     
    6262    gameData: new Array(
    6363    {
    64         title: "Veerkracht game session #1",
     64        title: "Gameplay errors",
    6565        creator: "Ellemiek Bosman",
    6666        date: "25-5-2012",
    67         description: "First play session. Users go into game without instructions."
    68     },
    69     {
    70         title: "Veerkracht game session #2",
     67        description: "First play session. Users starting game without any instructions."
     68    },
     69    {
     70        title: "Gameplay errors after feedback",
    7171        creator: "Ellemiek Bosman",
    7272        date: "25-5-2012",
    7373        description: "Second play session. Users have played game before and received feedback on their results."
     74    },
     75    {
     76        title: "Quality of control",
     77        creator: "Bruns von Blasuer",
     78        date: "18-2-2012",
     79        description: "Checking quality of control during gameplay."
     80    },
     81       {
     82        title: "Fault recovery",
     83        creator: "Bruns von Blasuer",
     84        date: "17-3-2012",
     85        description: "Second play session. Checking fault recovery after giving feedback."
    7486    }
    7587    )
     
    218230    var indexInCart = shoppingCart.contents.uids.indexOf(uid);
    219231    var tempTitle = shoppingCart.contents.titles[indexInCart];
    220     var cn = confirm("Are you sure you want to remove: "+tempTitle+"?");
     232    var cn = confirm("Are you sure you want to remove: "+tempTitle+ " from the selected data?");
    221233    if (cn == false) return;
    222234   
  • Dev/branches/Cartis/Tiles preview/js/nav.js

    r283 r296  
    3636       
    3737       
    38        
    39        
    40        
    41        
    42        
    43        
    44        
    45        
    46        
    47        
    48        
    49        
    5038    mockup = {
    5139        api: {
     
    7058                    $.getScript("pages/"+name+".js", function(responseText, textStatus, XMLHttpRequest){
    7159                       
    72                     })
     60                        })
    7361                });
    7462                mockup.api.breadcrumbs.navTo(name);
    7563            },
     64            auth: function(target, destination) {
     65                debugger;
     66                var name = document.getElementById("loginForm_name");
     67                var pw = document.getElementById("loginForm_password");
     68               
     69                if (name.value.length > 0 && pw.value.length > 0) {
     70                    mockup.api.clickTile(target, destination);
     71                }
     72               
     73            },
    7674            breadcrumbs: new (function() {
    77                 var _crumbs = ["Home"];
     75                var _crumbs = [];
    7876                var _element = document.getElementById('breadcrumbs');
    7977                this.init = function() {
Note: See TracChangeset for help on using the changeset viewer.