]> ToastFreeware Gitweb - chrisu/seepark.git/blob - web/static/seepark_web.js
Use user-friendly names for labels.
[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         }
23 });
24