Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 espaco 1
jQuery(document).ready(function() {
2
  // MORRIS CHARTS DEMOS
3
 
4
  // LINE CHART
5
  new Morris.Line({
6
        // ID of the element in which to draw the chart.
7
        element: 'morris_chart_1',
8
        // Chart data records -- each entry in this array corresponds to a point on
9
        // the chart.
10
        data: [
11
                { y: '2006', a: 100, b: 90 },
12
            { y: '2007', a: 75,  b: 65 },
13
            { y: '2008', a: 50,  b: 40 },
14
            { y: '2009', a: 75,  b: 65 },
15
            { y: '2010', a: 50,  b: 40 },
16
            { y: '2011', a: 75,  b: 65 },
17
            { y: '2012', a: 100, b: 90 }
18
        ],
19
        // The name of the data record attribute that contains x-values.
20
        xkey: 'y',
21
        // A list of names of data record attributes that contain y-values.
22
        ykeys: ['a', 'b'],
23
        // Labels for the ykeys -- will be displayed when you hover over the
24
        // chart.
25
        labels: ['Values A', 'Values B']
26
  });
27
 
28
 
29
  // AREA CHART
30
  new Morris.Area({
31
    element: 'morris_chart_2',
32
    data: [
33
      { y: '2006', a: 100, b: 90 },
34
      { y: '2007', a: 75,  b: 65 },
35
      { y: '2008', a: 50,  b: 40 },
36
      { y: '2009', a: 75,  b: 65 },
37
      { y: '2010', a: 50,  b: 40 },
38
      { y: '2011', a: 75,  b: 65 },
39
      { y: '2012', a: 100, b: 90 }
40
    ],
41
    xkey: 'y',
42
    ykeys: ['a', 'b'],
43
    labels: ['Series A', 'Series B']
44
  });
45
 
46
 
47
  // BAR CHART
48
  new Morris.Bar({
49
    element: 'morris_chart_3',
50
    data: [
51
      { y: '2006', a: 100, b: 90 },
52
      { y: '2007', a: 75,  b: 65 },
53
      { y: '2008', a: 50,  b: 40 },
54
      { y: '2009', a: 75,  b: 65 },
55
      { y: '2010', a: 50,  b: 40 },
56
      { y: '2011', a: 75,  b: 65 },
57
      { y: '2012', a: 100, b: 90 }
58
    ],
59
    xkey: 'y',
60
    ykeys: ['a', 'b'],
61
    labels: ['Series A', 'Series B']
62
  });
63
 
64
 
65
  // PIE CHART
66
  new Morris.Donut({
67
    element: 'morris_chart_4',
68
    data: [
69
      {label: "Download Sales", value: 12},
70
      {label: "In-Store Sales", value: 30},
71
      {label: "Mail-Order Sales", value: 20}
72
    ]
73
  });
74
});