c266172842bdc6a9e1a0c0f2cb30bb6439ddebd9
[chrisu/seepark.git] / web / static / seepark_web.js
1 var chart = c3.generate({
2         bindto: '#chart',
3         title: {
4                 text: 'Temperaturen'
5         },
6         data: {
7                 url: '/data',
8                 mimeType: 'json',
9                 xs: {
10                         '0316a2193bff': '0316a2193bff_x',
11                         '0316a21383ff': '0316a21383ff_x'
12                 },
13                 names: {
14                         '0316a2193bff': 'Wassertemperatur in 4 m Tiefe',
15                         '0316a21383ff': 'Wassertemperatur in 5 m Tiefe'
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