]> ToastFreeware Gitweb - chrisu/seepark.git/blob - web/static/seepark_web.js
Use example .js code from http://c3js.org.
[chrisu/seepark.git] / web / static / seepark_web.js
1 var chart = c3.generate({
2     bindto: '#chart',
3     data: {
4         x: 'x',
5 //        xFormat: '%Y%m%d', // 'xFormat' can be used as custom format of 'x'
6         columns: [
7             ['x', '2013-01-01', '2013-01-02', '2013-01-03', '2013-01-04', '2013-01-05', '2013-01-06'],
8 //            ['x', '20130101', '20130102', '20130103', '20130104', '20130105', '20130106'],
9             ['data1', 30, 200, 100, 400, 150, 250],
10             ['data2', 130, 340, 200, 500, 250, 350]
11         ]
12     },
13     axis: {
14         x: {
15             type: 'timeseries',
16             tick: {
17                 format: '%Y-%m-%d'
18             }
19         }
20     }
21 });
22