var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1788127200000,16.90000000],[1788127380000,16.88000000],[1788127680000,16.82000000],[1788127980000,16.72000000],[1788128280000,16.70000000],[1788128580000,16.70000000],[1788128880000,16.64000000],[1788129180000,16.56000000],[1788129480000,16.58000000],[1788129780000,16.50000000],[1788130080000,16.30000000],[1788130380000,16.20000000],[1788130680000,16.10000000],[1788130980000,15.84000000],[1788131280000,15.70000000],[1788131580000,15.50000000],[1788131880000,15.36000000],[1788132180000,15.22000000],[1788132480000,15.06000000],[1788132780000,14.88000000],[1788133080000,14.58000000],[1788133380000,14.48000000],[1788133680000,14.26000000],[1788133980000,14.20000000],[1788134280000,14.18000000],[1788134580000,14.20000000],[1788134880000,14.20000000],[1788135180000,14.24000000],[1788135480000,14.42000000],[1788135780000,14.68000000],[1788136080000,14.54000000],[1788136380000,14.56000000],[1788136680000,14.50000000],[1788136980000,14.30000000],[1788137280000,14.24000000],[1788137580000,14.06000000],[1788137880000,14.02000000],[1788138180000,13.90000000],[1788138480000,13.68000000],[1788138780000,13.44000000],[1788139080000,13.26000000],[1788139380000,13.14000000],[1788139680000,13.12000000],[1788139980000,13.04000000],[1788140280000,13.04000000],[1788140580000,13.12000000],[1788140880000,13.10000000],[1788141180000,13.08000000],[1788141480000,12.86000000],[1788141780000,12.70000000],[1788142080000,12.70000000],[1788142380000,12.76000000],[1788142680000,12.84000000],[1788142980000,12.76000000],[1788143280000,12.74000000],[1788143580000,12.90000000],[1788143880000,13.18000000],[1788144180000,13.28000000],[1788144480000,13.28000000],[1788144780000,13.48000000],[1788145080000,13.60000000],[1788145380000,13.92000000],[1788145680000,13.96000000],[1788145980000,13.88000000],[1788146280000,13.56000000],[1788146580000,13.38000000],[1788146880000,13.18000000],[1788147180000,12.86000000],[1788147480000,12.74000000],[1788147780000,12.46000000],[1788148080000,12.26000000],[1788148380000,12.24000000],[1788148680000,12.14000000],[1788148980000,12.00000000],[1788149280000,11.92000000],[1788149580000,11.86000000],[1788149880000,11.98000000],[1788150180000,12.08000000],[1788150480000,12.18000000],[1788150780000,12.36000000],[1788151080000,12.44000000],[1788151380000,12.46000000],[1788151680000,12.76000000],[1788151980000,13.06000000],[1788152280000,13.28000000],[1788152580000,13.42000000],[1788152880000,13.46000000],[1788153180000,13.18000000],[1788153480000,13.06000000],[1788153780000,13.10000000],[1788154080000,13.12000000],[1788154380000,13.20000000],[1788154680000,13.24000000],[1788154980000,13.30000000],[1788155280000,13.38000000],[1788155580000,13.54000000],[1788155880000,14.18000000],[1788156180000,14.86000000],[1788156480000,15.40000000],[1788156780000,16.16000000],[1788157080000,16.00000000],[1788157380000,16.08000000],[1788157680000,16.74000000],[1788157980000,16.90000000],[1788158280000,17.08000000],[1788158580000,17.58000000],[1788158880000,17.68000000],[1788159180000,17.96000000],[1788159480000,18.36000000],[1788159780000,18.58000000],[1788160080000,19.12000000],[1788160380000,19.40000000],[1788160680000,19.48000000],[1788160980000,19.94000000],[1788161280000,20.58000000],[1788161580000,20.76000000],[1788161880000,21.00000000],[1788162180000,21.34000000],[1788162480000,21.38000000],[1788162780000,21.70000000],[1788163080000,21.86000000],[1788163380000,22.04000000],[1788163680000,23.00000000],[1788163980000,23.28000000],[1788164280000,24.26000000],[1788164580000,23.88000000],[1788164880000,23.74000000],[1788165180000,24.70000000],[1788165480000,25.04000000],[1788165780000,25.40000000],[1788166080000,25.76000000],[1788166380000,26.38000000],[1788166680000,26.64000000],[1788166980000,27.04000000],[1788167280000,27.30000000],[1788167580000,27.54000000],[1788167880000,27.38000000],[1788168180000,27.42000000],[1788168480000,27.58000000],[1788168780000,27.78000000],[1788169080000,28.12000000],[1788169380000,28.30000000],[1788169680000,28.28000000],[1788169980000,28.00000000],[1788170280000,28.00000000],[1788170580000,28.08000000],[1788170880000,28.06000000],[1788171180000,28.32000000],[1788171480000,27.80000000],[1788171780000,27.54000000],[1788172080000,27.24000000],[1788172380000,27.28000000],[1788172680000,27.44000000],[1788172980000,27.14000000],[1788173280000,27.06000000],[1788173580000,26.86000000],[1788173880000,26.98000000],[1788174180000,27.24000000],[1788174480000,27.48000000],[1788174780000,27.44000000],[1788175080000,27.54000000],[1788175380000,27.52000000],[1788175680000,27.34000000],[1788175980000,27.32000000],[1788176280000,27.36000000],[1788176580000,27.48000000],[1788176880000,27.76000000],[1788177180000,28.56000000],[1788177480000,29.38000000],[1788177780000,29.10000000],[1788178080000,28.88000000],[1788178380000,28.92000000],[1788178680000,29.52000000],[1788178980000,29.58000000],[1788179280000,28.70000000],[1788179580000,28.26000000],[1788179880000,28.06000000],[1788180180000,27.86000000],[1788180480000,28.24000000],[1788180780000,29.40000000],[1788181080000,29.46000000],[1788181380000,28.88000000],[1788181680000,28.54000000],[1788181980000,28.16000000],[1788182280000,28.10000000],[1788182580000,27.94000000],[1788182880000,27.68000000],[1788183180000,27.48000000],[1788183480000,27.04000000],[1788183780000,26.50000000],[1788184080000,26.22000000],[1788184380000,26.10000000],[1788184680000,26.02000000],[1788184980000,26.00000000],[1788185280000,26.00000000],[1788185580000,26.20000000],[1788185880000,26.54000000],[1788186180000,26.92000000],[1788186480000,27.42000000],[1788186780000,27.60000000],[1788187080000,27.54000000],[1788187380000,27.84000000],[1788187680000,27.90000000],[1788187980000,27.76000000],[1788188280000,27.78000000],[1788188580000,27.84000000],[1788188880000,27.96000000],[1788189180000,27.90000000],[1788189480000,27.70000000],], 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; }