var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1781215238000,12.95000000],[1781215361000,12.94000000],[1781215672000,12.78000000],[1781215993000,12.67500000],[1781216314000,12.57500000],[1781216631000,12.52500000],[1781216877000,12.42000000],[1781217186000,12.42000000],[1781217495000,12.40000000],[1781217803000,12.42500000],[1781218050000,12.44000000],[1781218359000,12.42000000],[1781218668000,12.36000000],[1781218983000,12.25000000],[1781219305000,12.10000000],[1781219552000,12.16000000],[1781219861000,11.94000000],[1781220171000,11.82000000],[1781220480000,11.76000000],[1781220790000,11.65000000],[1781221111000,11.60000000],[1781221367000,11.68000000],[1781221683000,11.57500000],[1781222011000,11.60000000],[1781222259000,11.54000000],[1781222573000,11.46000000],[1781222884000,11.46000000],[1781223194000,11.44000000],[1781223509000,11.45000000],[1781223756000,11.38000000],[1781224065000,11.40000000],[1781224378000,11.32000000],[1781224687000,11.30000000],[1781224996000,11.30000000],[1781225306000,11.30000000],[1781225558000,11.26000000],[1781225872000,11.20000000],[1781226183000,11.20000000],[1781226494000,11.10000000],[1781226804000,11.10000000],[1781227053000,11.12500000],[1781227372000,11.10000000],[1781227690000,11.10000000],[1781228015000,11.10000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1781215238000,6.5],[1781215361000,6.5],[1781215672000,6.6],[1781215993000,6.5],[1781216314000,6.6],[1781216631000,6.6],[1781216877000,6.6],[1781217186000,6.7],[1781217495000,6.7],[1781217803000,6.7],[1781218050000,6.7],[1781218359000,6.6],[1781218668000,6.7],[1781218983000,6.7],[1781219305000,6.7],[1781219552000,6.7],[1781219861000,6.7],[1781220171000,6.7],[1781220480000,6.7],[1781220790000,6.6],[1781221111000,6.6],[1781221367000,6.7],[1781221683000,6.6],[1781222011000,6.6],[1781222259000,6.6],[1781222573000,6.6],[1781222884000,6.6],[1781223194000,6.6],[1781223509000,6.6],[1781223756000,6.6],[1781224065000,6.6],[1781224378000,6.6],[1781224687000,6.6],[1781224996000,6.5],[1781225306000,6.6],[1781225558000,6.5],[1781225872000,6.5],[1781226183000,6.5],[1781226494000,6.5],[1781226804000,6.5],[1781227053000,6.5],[1781227372000,6.5],[1781227690000,6.5],[1781228015000,6.5],], color: '#5b9f4a' } ]; var options = { xaxes: [{ axisLabel: 'temperature', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1°C' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-temperature-legend' } }; graphs['#chart-temperature'] = $.plot('#chart-temperature', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Vlhkosť (%)', data: [[1781215238000,65.10000000],[1781215361000,65.10000000],[1781215672000,66.10000000],[1781215993000,66.47500000],[1781216314000,67.20000000],[1781216631000,67.57500000],[1781216877000,68.00000000],[1781217186000,68.26000000],[1781217495000,68.40000000],[1781217803000,68.25000000],[1781218050000,68.18000000],[1781218359000,68.10000000],[1781218668000,68.54000000],[1781218983000,69.22500000],[1781219305000,69.87500000],[1781219552000,69.74000000],[1781219861000,70.58000000],[1781220171000,71.00000000],[1781220480000,71.26000000],[1781220790000,71.62500000],[1781221111000,71.86666667],[1781221367000,71.56000000],[1781221683000,71.95000000],[1781222011000,71.70000000],[1781222259000,72.04000000],[1781222573000,72.52000000],[1781222884000,72.52000000],[1781223194000,72.56000000],[1781223509000,72.50000000],[1781223756000,72.80000000],[1781224065000,72.76000000],[1781224378000,72.90000000],[1781224687000,72.94000000],[1781224996000,72.70000000],[1781225306000,72.85000000],[1781225558000,73.00000000],[1781225872000,73.10000000],[1781226183000,73.18000000],[1781226494000,73.56000000],[1781226804000,73.57500000],[1781227053000,73.25000000],[1781227372000,73.45000000],[1781227690000,73.45000000],[1781228015000,73.40000000],], color: '#ff9000' } ]; var options = { xaxes: [{ axisLabel: 'humidity', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1%' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-humidity-legend' } }; graphs['#chart-humidity'] = $.plot('#chart-humidity', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Atmosférický tlak (hPa)', data: [[1781215238000,1022.6],[1781215361000,1022.6],[1781215672000,1022.6],[1781215993000,1022.6],[1781216314000,1022.6],[1781216631000,1022.6],[1781216877000,1022.6],[1781217186000,1022.6],[1781217495000,1022.6],[1781217803000,1022.7],[1781218050000,1022.7],[1781218359000,1022.8],[1781218668000,1022.8],[1781218983000,1022.9],[1781219305000,1022.8],[1781219552000,1022.8],[1781219861000,1022.8],[1781220171000,1022.8],[1781220480000,1022.7],[1781220790000,1022.7],[1781221111000,1022.7],[1781221367000,1022.8],[1781221683000,1022.9],[1781222011000,1022.9],[1781222259000,1022.9],[1781222573000,1022.9],[1781222884000,1022.9],[1781223194000,1022.8],[1781223509000,1022.9],[1781223756000,1022.8],[1781224065000,1022.7],[1781224378000,1022.8],[1781224687000,1022.8],[1781224996000,1022.7],[1781225306000,1022.7],[1781225558000,1022.8],[1781225872000,1022.8],[1781226183000,1022.8],[1781226494000,1023],[1781226804000,1023],[1781227053000,1022.9],[1781227372000,1023],[1781227690000,1022.9],[1781228015000,1023],], color: '#000000' } ]; var options = { xaxes: [{ axisLabel: 'pressure', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1hPa' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-pressure-legend' } }; graphs['#chart-pressure'] = $.plot('#chart-pressure', dataset, options); }); $('.modal').on('hide.bs.modal', function() { var memory = $(this).html(); $(this).html(memory); }); function meteo_wind_direction_name(wind_direction) { if (wind_direction >= 0.00 && wind_direction <= 11.25) { ret = 'S'; } else if (wind_direction > 11.25 && wind_direction <= 33.75) { ret = 'SSV'; } else if (wind_direction > 33.75 && wind_direction <= 56.25) { ret = 'SV'; } else if (wind_direction > 56.25 && wind_direction <= 78.75) { // 67.5 ret = 'VSV'; } else if (wind_direction > 78.75 && wind_direction <= 101.25) { // 90 ret = 'V'; } else if (wind_direction > 101.25 && wind_direction <= 123.75) { //112.5 ret = 'VJV'; } else if (wind_direction > 123.75 && wind_direction <= 146.25) { // 135 ret = 'JV'; } else if (wind_direction > 146.25 && wind_direction <= 168.75) { // 157.5 ret = 'JJV'; } else if (wind_direction > 168.75 && wind_direction <= 191.25) { // 180 ret = 'J'; } else if (wind_direction > 191.25 && wind_direction <= 213.75) { // 202.5 ret = 'JJZ'; } else if (wind_direction > 213.75 && wind_direction <= 236.25) { // 225 ret = 'JZ'; } else if (wind_direction > 236.25 && wind_direction <= 258.75) { // 247.5 ret = 'ZJZ'; } else if (wind_direction > 258.75 && wind_direction <= 281.25) { // 270 ret = 'Z'; } else if (wind_direction > 281.25 && wind_direction <= 303.75) { // 292.5 ret = 'ZSZ'; } else if (wind_direction > 303.75 && wind_direction <= 326.25) { // 315 ret = 'SZ'; } else if (wind_direction > 326.25 && wind_direction <= 348.75) { // 337.5 ret = 'SSZ'; } else if (wind_direction > 348.75 && wind_direction <= 360.0) { // 337.5 ret = 'S'; } else { return ''; } return ret; }