var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1788127200000,18.50000000],[1788127380000,18.56000000],[1788127680000,18.68000000],[1788127980000,18.66000000],[1788128280000,18.34000000],[1788128580000,18.30000000],[1788128880000,18.40000000],[1788129180000,18.38000000],[1788129480000,18.12000000],[1788129780000,17.96000000],[1788130080000,18.08000000],[1788130380000,18.14000000],[1788130680000,18.14000000],[1788130980000,18.00000000],[1788131280000,17.90000000],[1788131580000,17.94000000],[1788131880000,18.02000000],[1788132180000,18.00000000],[1788132480000,17.94000000],[1788132780000,17.84000000],[1788133080000,17.80000000],[1788133380000,17.86000000],[1788133680000,18.10000000],[1788133980000,18.28000000],[1788134280000,18.40000000],[1788134580000,18.50000000],[1788134880000,18.54000000],[1788135180000,18.50000000],[1788135480000,18.50000000],[1788135780000,18.34000000],[1788136080000,18.14000000],[1788136380000,18.20000000],[1788136680000,17.98000000],[1788136980000,17.88000000],[1788137280000,17.76000000],[1788137580000,17.38000000],[1788137880000,17.14000000],[1788138180000,16.98000000],[1788138480000,16.86000000],[1788138780000,16.56000000],[1788139080000,16.62000000],[1788139380000,16.42000000],[1788139680000,16.58000000],[1788139980000,16.78000000],[1788140280000,16.94000000],[1788140580000,16.84000000],[1788140880000,16.98000000],[1788141180000,17.20000000],[1788141480000,17.02000000],[1788141780000,16.86000000],[1788142080000,16.74000000],[1788142380000,16.56000000],[1788142680000,16.34000000],[1788142980000,16.48000000],[1788143280000,16.84000000],[1788143580000,16.92000000],[1788143880000,17.04000000],[1788144180000,17.12000000],[1788144480000,17.06000000],[1788144780000,16.84000000],[1788145080000,16.58000000],[1788145380000,16.50000000],[1788145680000,16.32000000],[1788145980000,16.10000000],[1788146280000,16.18000000],[1788146580000,16.32000000],[1788146880000,16.68000000],[1788147180000,16.98000000],[1788147480000,17.04000000],[1788147780000,17.14000000],[1788148080000,17.22000000],[1788148380000,17.24000000],[1788148680000,17.24000000],[1788148980000,17.22000000],[1788149280000,17.02000000],[1788149580000,16.78000000],[1788149880000,16.78000000],[1788150180000,16.68000000],[1788150480000,16.54000000],[1788150780000,16.46000000],[1788151080000,16.34000000],[1788151380000,16.44000000],[1788151680000,16.56000000],[1788151980000,16.78000000],[1788152280000,17.08000000],[1788152580000,17.28000000],[1788152880000,17.48000000],[1788153180000,17.66000000],[1788153480000,17.92000000],[1788153780000,18.18000000],[1788154080000,18.50000000],[1788154380000,18.78000000],[1788154680000,19.12000000],[1788154980000,19.50000000],[1788155280000,19.90000000],[1788155580000,20.24000000],[1788155880000,20.62000000],[1788156180000,20.86000000],[1788156480000,21.04000000],[1788156780000,21.00000000],[1788157080000,21.38000000],[1788157380000,21.86000000],[1788157680000,21.78000000],[1788157980000,22.06000000],[1788158280000,22.34000000],[1788158580000,22.54000000],[1788158880000,22.76000000],[1788159180000,22.70000000],[1788159480000,23.14000000],[1788159780000,23.62000000],[1788160080000,23.94000000],[1788160380000,24.06000000],[1788160680000,24.46000000],[1788160980000,25.14000000],[1788161280000,25.40000000],[1788161580000,25.70000000],[1788161880000,25.74000000],[1788162180000,25.76000000],[1788162480000,25.74000000],[1788162780000,25.86000000],[1788163080000,26.56000000],[1788163380000,26.92000000],[1788163680000,27.16000000],[1788163980000,27.56000000],[1788164280000,27.36000000],[1788164580000,27.44000000],[1788164880000,27.42000000],[1788165180000,27.56000000],[1788165480000,27.98000000],[1788165780000,28.06000000],[1788166080000,28.48000000],[1788166380000,28.74000000],[1788166680000,28.92000000],[1788166980000,29.08000000],[1788167280000,29.40000000],[1788167580000,29.96000000],[1788167880000,29.48000000],[1788168180000,30.22000000],[1788168480000,30.70000000],[1788168780000,30.48000000],[1788169080000,30.04000000],[1788169380000,30.02000000],[1788169680000,30.30000000],[1788169980000,30.66000000],[1788170280000,30.96000000],[1788170580000,31.08000000],[1788170880000,31.98000000],[1788171180000,32.06000000],[1788171480000,32.02000000],[1788171780000,32.54000000],[1788172080000,32.62000000],[1788172380000,32.38000000],[1788172680000,32.68000000],[1788172980000,32.86000000],[1788173280000,32.68000000],[1788173580000,32.54000000],[1788173880000,32.40000000],[1788174180000,32.32000000],[1788174480000,32.44000000],[1788174780000,32.54000000],[1788175080000,32.70000000],[1788175380000,32.98000000],[1788175680000,32.84000000],[1788175980000,32.58000000],[1788176280000,31.90000000],[1788176580000,31.66000000],[1788176880000,31.34000000],[1788177180000,31.22000000],[1788177480000,30.96000000],[1788177780000,31.24000000],[1788178080000,31.18000000],[1788178380000,31.06000000],[1788178680000,30.60000000],[1788178980000,30.64000000],[1788179280000,30.80000000],[1788179580000,31.20000000],[1788179880000,30.84000000],[1788180180000,30.72000000],[1788180480000,30.34000000],[1788180780000,30.04000000],[1788181080000,30.30000000],[1788181380000,30.20000000],[1788181680000,30.02000000],[1788181980000,30.30000000],[1788182280000,30.18000000],[1788182580000,29.96000000],[1788182880000,30.68000000],[1788183180000,31.06000000],[1788183480000,30.98000000],[1788183780000,30.90000000],[1788184080000,30.66000000],[1788184380000,29.72000000],[1788184680000,29.36000000],[1788184980000,29.20000000],[1788185280000,28.86000000],[1788185580000,29.02000000],[1788185880000,29.48000000],[1788186180000,29.52000000],[1788186480000,29.50000000],[1788186780000,29.40000000],[1788187080000,28.88000000],[1788187380000,28.72000000],[1788187680000,28.80000000],[1788187980000,28.86000000],[1788188280000,29.00000000],[1788188580000,28.98000000],[1788188880000,28.58000000],[1788189180000,28.18000000],[1788189480000,28.20000000],], 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; }