Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 espaco 1
var examples = require('./examples');
2
 
3
examples.def('line', function () {
4
  Morris.Line({
5
    element: 'chart',
6
    data: [
7
      { x: 0, y: 10, z: 30 }, { x: 1, y: 20, z: 20 },
8
      { x: 2, y: 30, z: 10 }, { x: 3, y: 30, z: 10 },
9
      { x: 4, y: 20, z: 20 }, { x: 5, y: 10, z: 30 }
10
    ],
11
    xkey: 'x',
12
    ykeys: ['y', 'z'],
13
    labels: ['y', 'z'],
14
    parseTime: false
15
  });
16
  window.snapshot();
17
});
18
 
19
examples.def('area', function () {
20
  Morris.Area({
21
    element: 'chart',
22
    data: [
23
      { x: 0, y: 1, z: 1 }, { x: 1, y: 2, z: 1 },
24
      { x: 2, y: 3, z: 1 }, { x: 3, y: 3, z: 1 },
25
      { x: 4, y: 2, z: 1 }, { x: 5, y: 1, z: 1 }
26
    ],
27
    xkey: 'x',
28
    ykeys: ['y', 'z'],
29
    labels: ['y', 'z'],
30
    parseTime: false
31
  });
32
  window.snapshot();
33
});
34
 
35
examples.def('bar', function () {
36
  Morris.Bar({
37
    element: 'chart',
38
    data: [
39
      { x: 0, y: 1, z: 3 }, { x: 1, y: 2, z: 2 },
40
      { x: 2, y: 3, z: 1 }, { x: 3, y: 3, z: 1 },
41
      { x: 4, y: 2, z: 2 }, { x: 5, y: 1, z: 3 }
42
    ],
43
    xkey: 'x',
44
    ykeys: ['y', 'z'],
45
    labels: ['y', 'z']
46
  });
47
  window.snapshot();
48
});
49
 
50
examples.def('stacked_bar', function () {
51
  Morris.Bar({
52
    element: 'chart',
53
    data: [
54
      { x: 0, y: 1, z: 1 }, { x: 1, y: 2, z: 1 },
55
      { x: 2, y: 3, z: 1 }, { x: 3, y: 3, z: 1 },
56
      { x: 4, y: 2, z: 1 }, { x: 5, y: 1, z: 1 }
57
    ],
58
    xkey: 'x',
59
    ykeys: ['y', 'z'],
60
    labels: ['y', 'z'],
61
    stacked: true
62
  });
63
  window.snapshot();
64
});
65
 
66
examples.run();