var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1788127200000,17.26666667],[1788127380000,17.40000000],[1788127680000,17.34000000],[1788127980000,17.30000000],[1788128280000,17.16000000],[1788128580000,17.06000000],[1788128880000,17.32000000],[1788129180000,17.12000000],[1788129480000,17.10000000],[1788129780000,17.16000000],[1788130080000,17.18000000],[1788130380000,17.22500000],[1788130680000,17.30000000],[1788130980000,17.24000000],[1788131280000,16.98000000],[1788131580000,17.16000000],[1788131880000,17.00000000],[1788132180000,16.78000000],[1788132480000,16.62000000],[1788132780000,16.64000000],[1788133080000,16.34000000],[1788133380000,16.20000000],[1788133680000,16.06000000],[1788133980000,15.72000000],[1788134280000,15.78000000],[1788134580000,15.58000000],[1788134880000,15.82000000],[1788135180000,16.04000000],[1788135480000,15.70000000],[1788135780000,15.50000000],[1788136080000,15.26000000],[1788136380000,15.16000000],[1788136680000,15.20000000],[1788136980000,15.08000000],[1788137280000,14.92000000],[1788137580000,14.80000000],[1788137880000,14.76000000],[1788138180000,14.42000000],[1788138480000,14.44000000],[1788138780000,14.44000000],[1788139080000,14.22000000],[1788139380000,14.30000000],[1788139680000,14.28000000],[1788139980000,14.16000000],[1788140280000,14.06000000],[1788140580000,14.06000000],[1788140880000,14.00000000],[1788141180000,14.08000000],[1788141480000,14.10000000],[1788141780000,14.00000000],[1788142080000,13.90000000],[1788142380000,14.08000000],[1788142680000,13.92000000],[1788142980000,13.94000000],[1788143280000,14.12000000],[1788143580000,14.14000000],[1788143880000,14.00000000],[1788144180000,13.96000000],[1788144480000,13.82000000],[1788144780000,13.74000000],[1788145080000,13.92000000],[1788145380000,13.88000000],[1788145680000,13.84000000],[1788145980000,13.90000000],[1788146280000,13.92000000],[1788146580000,13.92000000],[1788146880000,13.92000000],[1788147180000,13.94000000],[1788147480000,13.98000000],[1788147780000,14.02000000],[1788148080000,13.96000000],[1788148380000,13.98000000],[1788148680000,13.84000000],[1788148980000,13.90000000],[1788149280000,13.94000000],[1788149580000,13.94000000],[1788149880000,13.90000000],[1788150180000,13.84000000],[1788150480000,13.90000000],[1788150780000,13.98000000],[1788151080000,14.00000000],[1788151380000,14.00000000],[1788151680000,14.12000000],[1788151980000,14.34000000],[1788152280000,14.67500000],[1788152580000,14.78000000],[1788152880000,15.02000000],[1788153180000,15.36000000],[1788153480000,15.70000000],[1788153780000,16.10000000],[1788154080000,16.36000000],[1788154380000,16.78000000],[1788154680000,17.12000000],[1788154980000,17.46000000],[1788155280000,17.80000000],[1788155580000,18.14000000],[1788155880000,18.60000000],[1788156180000,19.06000000],[1788156480000,19.40000000],[1788156780000,19.72000000],[1788157080000,20.06000000],[1788157380000,20.38000000],[1788157680000,20.88000000],[1788157980000,21.16000000],[1788158280000,21.36000000],[1788158580000,21.34000000],[1788158880000,21.66000000],[1788159180000,22.28000000],[1788159480000,22.88000000],[1788159780000,22.84000000],[1788160080000,23.22000000],[1788160380000,23.48000000],[1788160680000,23.76000000],[1788160980000,24.08000000],[1788161280000,23.62000000],[1788161580000,24.12000000],[1788161880000,25.26000000],[1788162180000,25.62000000],[1788162480000,26.02000000],[1788162780000,26.20000000],[1788163080000,26.32000000],[1788163380000,26.52000000],[1788163680000,26.84000000],[1788163980000,26.64000000],[1788164280000,26.92000000],[1788164580000,26.66000000],[1788164880000,27.40000000],[1788165180000,27.58000000],[1788165480000,27.56000000],[1788165780000,28.00000000],[1788166080000,28.22000000],[1788166380000,28.70000000],[1788166680000,28.60000000],[1788166980000,29.24000000],[1788167280000,29.46000000],[1788167580000,29.54000000],[1788167880000,29.82000000],[1788168180000,30.52000000],[1788168480000,30.30000000],[1788168780000,30.60000000],[1788169080000,30.42000000],[1788169380000,30.70000000],[1788169680000,31.16000000],[1788169980000,31.12000000],[1788170280000,31.28000000],[1788170580000,31.82000000],[1788170880000,31.46000000],[1788171180000,31.48000000],[1788171480000,31.78000000],[1788171780000,31.70000000],[1788172080000,32.08000000],[1788172380000,32.42000000],[1788172680000,33.04000000],[1788172980000,32.78000000],[1788173280000,32.78000000],[1788173580000,32.88000000],[1788173880000,33.16000000],[1788174180000,33.16000000],[1788174480000,33.24000000],[1788174780000,33.34000000],[1788175080000,33.60000000],[1788175380000,33.10000000],[1788175680000,33.04000000],[1788175980000,33.44000000],[1788176280000,33.12000000],[1788176580000,33.44000000],[1788176880000,33.14000000],[1788177180000,33.18000000],[1788177480000,33.42000000],[1788177780000,33.24000000],[1788178080000,33.62000000],[1788178380000,33.50000000],[1788178680000,33.42000000],[1788178980000,33.94000000],[1788179280000,33.68000000],[1788179580000,33.62000000],[1788179880000,33.64000000],[1788180180000,33.86000000],[1788180480000,33.86000000],[1788180780000,34.08000000],[1788181080000,33.70000000],[1788181380000,33.70000000],[1788181680000,33.88000000],[1788181980000,33.58000000],[1788182280000,33.60000000],[1788182580000,33.68000000],[1788182880000,33.76000000],[1788183180000,33.46000000],[1788183480000,33.48000000],[1788183780000,33.48000000],[1788184080000,33.52000000],[1788184380000,33.44000000],[1788184680000,33.18000000],[1788184980000,33.30000000],[1788185280000,33.26000000],[1788185580000,33.36000000],[1788185880000,33.44000000],[1788186180000,33.32000000],[1788186480000,33.24000000],[1788186780000,33.24000000],[1788187080000,33.24000000],[1788187380000,33.10000000],[1788187680000,33.10000000],[1788187980000,32.80000000],[1788188280000,32.58000000],[1788188580000,32.52000000],[1788188880000,32.38000000],[1788189180000,32.30000000],[1788189480000,32.40000000],], 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; }