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