var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1788127200000,14.60000000],[1788127380000,14.46000000],[1788127680000,14.48000000],[1788127980000,14.32000000],[1788128280000,14.34000000],[1788128580000,14.34000000],[1788128880000,14.42000000],[1788129180000,14.24000000],[1788129480000,14.42000000],[1788129780000,14.62000000],[1788130080000,14.68000000],[1788130380000,14.66000000],[1788130680000,14.58000000],[1788130980000,14.44000000],[1788131280000,14.32000000],[1788131580000,14.18000000],[1788131880000,14.08000000],[1788132180000,14.04000000],[1788132480000,14.16000000],[1788132780000,14.06000000],[1788133080000,13.92000000],[1788133380000,13.78000000],[1788133680000,13.88000000],[1788133980000,13.90000000],[1788134280000,13.80000000],[1788134580000,13.52000000],[1788134880000,13.44000000],[1788135180000,13.38000000],[1788135480000,13.54000000],[1788135780000,13.44000000],[1788136080000,13.42000000],[1788136380000,13.68000000],[1788136680000,13.62000000],[1788136980000,13.52000000],[1788137280000,13.48000000],[1788137580000,13.44000000],[1788137880000,13.38000000],[1788138180000,13.32000000],[1788138480000,13.12000000],[1788138780000,12.98000000],[1788139080000,12.98000000],[1788139380000,12.98000000],[1788139680000,12.96000000],[1788139980000,12.88000000],[1788140280000,13.02000000],[1788140580000,13.02000000],[1788140880000,13.16000000],[1788141180000,13.70000000],[1788141480000,13.64000000],[1788141780000,13.62000000],[1788142080000,13.50000000],[1788142380000,13.34000000],[1788142680000,13.10000000],[1788142980000,13.26000000],[1788143280000,13.40000000],[1788143580000,13.30000000],[1788143880000,13.00000000],[1788144180000,13.04000000],[1788144480000,13.00000000],[1788144780000,12.96000000],[1788145080000,13.06000000],[1788145380000,12.68000000],[1788145680000,12.54000000],[1788145980000,12.80000000],[1788146280000,12.94000000],[1788146580000,12.72000000],[1788146880000,12.62000000],[1788147180000,12.60000000],[1788147480000,12.60000000],[1788147780000,12.46000000],[1788148080000,12.36000000],[1788148380000,12.22000000],[1788148680000,12.32000000],[1788148980000,12.54000000],[1788149280000,12.60000000],[1788149580000,12.64000000],[1788149880000,12.64000000],[1788150180000,12.58000000],[1788150480000,12.64000000],[1788150780000,13.24000000],[1788151080000,13.42000000],[1788151380000,13.60000000],[1788151680000,13.68000000],[1788151980000,13.70000000],[1788152280000,13.84000000],[1788152580000,14.24000000],[1788152880000,14.66000000],[1788153180000,14.90000000],[1788153480000,15.08000000],[1788153780000,15.16000000],[1788154080000,15.22000000],[1788154380000,15.68000000],[1788154680000,15.78000000],[1788154980000,16.10000000],[1788155280000,16.36000000],[1788155580000,16.48000000],[1788155880000,16.72000000],[1788156180000,17.14000000],[1788156480000,17.50000000],[1788156780000,17.80000000],[1788157080000,18.06000000],[1788157380000,18.24000000],[1788157680000,18.48000000],[1788157980000,18.74000000],[1788158280000,19.08000000],[1788158580000,19.46000000],[1788158880000,19.70000000],[1788159180000,19.94000000],[1788159480000,20.24000000],[1788159780000,20.48000000],[1788160080000,20.74000000],[1788160380000,21.06000000],[1788160680000,21.42000000],[1788160980000,21.88000000],[1788161280000,22.30000000],[1788161580000,22.62000000],[1788161880000,23.00000000],[1788162180000,23.30000000],[1788162480000,23.38000000],[1788162780000,23.90000000],[1788163080000,24.18000000],[1788163380000,24.38000000],[1788163680000,24.72000000],[1788163980000,25.12000000],[1788164280000,25.58000000],[1788164580000,25.92000000],[1788164880000,26.12000000],[1788165180000,26.40000000],[1788165480000,27.16000000],[1788165780000,27.48000000],[1788166080000,28.20000000],[1788166380000,28.44000000],[1788166680000,28.62000000],[1788166980000,28.90000000],[1788167280000,29.04000000],[1788167580000,29.06000000],[1788167880000,29.14000000],[1788168180000,29.30000000],[1788168480000,29.44000000],[1788168780000,29.22000000],[1788169080000,29.44000000],[1788169380000,29.10000000],[1788169680000,29.44000000],[1788169980000,29.28000000],[1788170280000,29.84000000],[1788170580000,29.70000000],[1788170880000,29.72000000],[1788171180000,30.02000000],[1788171480000,30.38000000],[1788171780000,30.16000000],[1788172080000,30.28000000],[1788172380000,30.38000000],[1788172680000,30.14000000],[1788172980000,30.56000000],[1788173280000,30.60000000],[1788173580000,30.70000000],[1788173880000,30.50000000],[1788174180000,30.50000000],[1788174480000,30.50000000],[1788174780000,30.72000000],[1788175080000,30.80000000],[1788175380000,30.64000000],[1788175680000,31.38000000],[1788175980000,31.44000000],[1788176280000,31.54000000],[1788176580000,31.62000000],[1788176880000,31.58000000],[1788177180000,31.38000000],[1788177480000,31.40000000],[1788177780000,31.22000000],[1788178080000,31.32000000],[1788178380000,31.46000000],[1788178680000,31.38000000],[1788178980000,31.26000000],[1788179280000,31.20000000],[1788179580000,31.34000000],[1788179880000,30.96000000],[1788180180000,31.28000000],[1788180480000,30.96000000],[1788180780000,30.74000000],[1788181080000,30.22000000],[1788181380000,30.42000000],[1788181680000,30.72000000],[1788181980000,30.50000000],[1788182280000,30.76000000],[1788182580000,30.66000000],[1788182880000,30.66000000],[1788183180000,30.62000000],[1788183480000,30.50000000],[1788183780000,30.50000000],[1788184080000,30.66000000],[1788184380000,30.62000000],[1788184680000,30.48000000],[1788184980000,30.76000000],[1788185280000,30.62000000],[1788185580000,30.62000000],[1788185880000,30.36000000],[1788186180000,30.16000000],[1788186480000,30.24000000],[1788186780000,30.14000000],[1788187080000,30.10000000],[1788187380000,29.90000000],[1788187680000,29.46000000],[1788187980000,29.18000000],[1788188280000,29.04000000],[1788188580000,28.98000000],[1788188880000,28.98000000],[1788189180000,28.90000000],[1788189480000,28.80000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [], 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: 'Zrážky', data: [[1788127200000,0],[1788127380000,0],[1788127680000,0],[1788127980000,0],[1788128280000,0],[1788128580000,0],[1788128880000,0],[1788129180000,0],[1788129480000,0],[1788129780000,0],[1788130080000,0],[1788130380000,0],[1788130680000,0],[1788130980000,0],[1788131280000,0],[1788131580000,0],[1788131880000,0],[1788132180000,0],[1788132480000,0],[1788132780000,0],[1788133080000,0],[1788133380000,0],[1788133680000,0],[1788133980000,0],[1788134280000,0],[1788134580000,0],[1788134880000,0],[1788135180000,0],[1788135480000,0],[1788135780000,0],[1788136080000,0],[1788136380000,0],[1788136680000,0],[1788136980000,0],[1788137280000,0],[1788137580000,0],[1788137880000,0],[1788138180000,0],[1788138480000,0],[1788138780000,0],[1788139080000,0],[1788139380000,0],[1788139680000,0],[1788139980000,0],[1788140280000,0],[1788140580000,0],[1788140880000,0],[1788141180000,0],[1788141480000,0],[1788141780000,0],[1788142080000,0],[1788142380000,0],[1788142680000,0],[1788142980000,0],[1788143280000,0],[1788143580000,0],[1788143880000,0],[1788144180000,0],[1788144480000,0],[1788144780000,0],[1788145080000,0],[1788145380000,0],[1788145680000,0],[1788145980000,0],[1788146280000,0],[1788146580000,0],[1788146880000,0],[1788147180000,0],[1788147480000,0],[1788147780000,0],[1788148080000,0],[1788148380000,0],[1788148680000,0],[1788148980000,0],[1788149280000,0],[1788149580000,0],[1788149880000,0],[1788150180000,0],[1788150480000,0],[1788150780000,0],[1788151080000,0],[1788151380000,0],[1788151680000,0],[1788151980000,0],[1788152280000,0],[1788152580000,0],[1788152880000,0],[1788153180000,0],[1788153480000,0],[1788153780000,0],[1788154080000,0],[1788154380000,0],[1788154680000,0],[1788154980000,0],[1788155280000,0],[1788155580000,0],[1788155880000,0],[1788156180000,0],[1788156480000,0],[1788156780000,0],[1788157080000,0],[1788157380000,0],[1788157680000,0],[1788157980000,0],[1788158280000,0],[1788158580000,0],[1788158880000,0],[1788159180000,0],[1788159480000,0],[1788159780000,0],[1788160080000,0],[1788160380000,0],[1788160680000,0],[1788160980000,0],[1788161280000,0],[1788161580000,0],[1788161880000,0],[1788162180000,0],[1788162480000,0],[1788162780000,0],[1788163080000,0],[1788163380000,0],[1788163680000,0],[1788163980000,0],[1788164280000,0],[1788164580000,0],[1788164880000,0],[1788165180000,0],[1788165480000,0],[1788165780000,0],[1788166080000,0],[1788166380000,0],[1788166680000,0],[1788166980000,0],[1788167280000,0],[1788167580000,0],[1788167880000,0],[1788168180000,0],[1788168480000,0],[1788168780000,0],[1788169080000,0],[1788169380000,0],[1788169680000,0],[1788169980000,0],[1788170280000,0],[1788170580000,0],[1788170880000,0],[1788171180000,0],[1788171480000,0],[1788171780000,0],[1788172080000,0],[1788172380000,0],[1788172680000,0],[1788172980000,0],[1788173280000,0],[1788173580000,0],[1788173880000,0],[1788174180000,0],[1788174480000,0],[1788174780000,0],[1788175080000,0],[1788175380000,0],[1788175680000,0],[1788175980000,0],[1788176280000,0],[1788176580000,0],[1788176880000,0],[1788177180000,0],[1788177480000,0],[1788177780000,0],[1788178080000,0],[1788178380000,0],[1788178680000,0],[1788178980000,0],[1788179280000,0],[1788179580000,0],[1788179880000,0],[1788180180000,0],[1788180480000,0],[1788180780000,0],[1788181080000,0],[1788181380000,0],[1788181680000,0],[1788181980000,0],[1788182280000,0],[1788182580000,0],[1788182880000,0],[1788183180000,0],[1788183480000,0],[1788183780000,0],[1788184080000,0],[1788184380000,0],[1788184680000,0],[1788184980000,0],[1788185280000,0],[1788185580000,0],[1788185880000,0],[1788186180000,0],[1788186480000,0],[1788186780000,0],[1788187080000,0],[1788187380000,0],[1788187680000,0],[1788187980000,0],[1788188280000,0],[1788188580000,0],[1788188880000,0],[1788189180000,0],[1788189480000,0],], color: '#008fbf' } ]; var options = { xaxes: [{ axisLabel: 'rain', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, yaxis: { min: 0, }, 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.3mm' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-rain-legend' } }; graphs['#chart-rain'] = $.plot('#chart-rain', 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; }