Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
M.report_overviewstats = M.report_overviewstats || {};
2
M.report_overviewstats.charts = M.report_overviewstats.charts || {};
3
M.report_overviewstats.charts.enrolments = {
4
 
5
    /**
6
     * @method init
7
     * @param data
8
     */
9
    init: function(data) {
10
        var lastmonth = new Y.Chart({
11
            type: "combo",
12
            dataProvider: data.lastmonth,
13
            categoryKey: "date",
14
            horizontalGridlines: true,
15
            verticalGridlines: true,
16
            axes: {
17
                values: {
18
                    labelFormat: {
19
                        decimalPlaces: 1
20
                    }
21
                }
22
            },
23
            styles: {
24
                axes: {
25
                    date: {
26
                        label: {
27
                            rotation: -90
28
                        }
29
                    }
30
                }
31
            }
32
 
33
        });
34
 
35
        Y.one("#chart_enrolments_lastmonth").setStyle("backgroundImage", "none");
36
        lastmonth.render("#chart_enrolments_lastmonth");
37
 
38
        var lastyear = new Y.Chart({
39
            type: "combo",
40
            dataProvider: data.lastyear,
41
            categoryKey: "date",
42
            horizontalGridlines: true,
43
            verticalGridlines: true,
44
            axes: {
45
                values: {
46
                    labelFormat: {
47
                        decimalPlaces: 1
48
                    }
49
                }
50
            },
51
            styles: {
52
                axes: {
53
                    date: {
54
                        label: {
55
                            rotation: -90
56
                        }
57
                    }
58
                }
59
            }
60
 
61
        });
62
 
63
        Y.one("#chart_enrolments_lastyear").setStyle("backgroundImage", "none");
64
        lastyear.render("#chart_enrolments_lastyear");
65
    }
66
};