]> ToastFreeware Gitweb - chrisu/seepark.git/blob - web/static/seepark_web.js
9cb1b60c94b8e5c4d68639500594137d47bc4a9d
[chrisu/seepark.git] / web / static / seepark_web.js
1 var chart = c3.generate({
2         bindto: '#chart',
3         data: {
4                 url: '/data',
5                 mimeType: 'json',
6                 xs: {
7                         'water_temperature': 'water_temperature_x',
8                         'air_temperature': 'air_temperature_x'
9                 },
10                 names: {
11                         'water_temperature': 'Wassertemperatur',
12                         'air_temperature': 'Lufttemperatur'
13                 }
14         },
15         axis: {
16                 x: {
17                         type: 'timeseries',
18                         tick: {
19                                 format: '%Y-%m-%d'
20                         }
21                 },
22                 y: {
23                         label: {
24                                 text: '°C',
25                                 position: 'outer-middle'
26                         }
27                 }
28         }
29 });
30