1new Morris.Line({
2 // ID of the element in which to draw the chart.
3 element: 'myfirstchart',
4 // Chart data records -- each entry in this array corresponds to a point on
5 // the chart.
6 data: [
7 { year: '2008', value: 20 },
8 { year: '2009', value: 10 },
9 { year: '2010', value: 5 },
10 { year: '2011', value: 5 },
11 { year: '2012', value: 20 }
12 ],
13 // The name of the data record attribute that contains x-values.
14 xkey: 'year',
15 // A list of names of data record attributes that contain y-values.
16 ykeys: ['value'],
17 // Labels for the ykeys -- will be displayed when you hover over the
18 // chart.
19 labels: ['Value']
20});