var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1623621601000,11.80000000],[1623621765000,12.00000000],[1623622141000,11.80000000],[1623622382000,11.75000000],[1623622681000,11.88000000],[1623622981000,11.62000000],[1623623282000,11.72000000],[1623623616000,11.62000000],[1623623927000,11.60000000],[1623624182000,11.58000000],[1623624542000,11.60000000],[1623624794000,11.50000000],[1623625058000,11.58571429],[1623625419000,11.56666667],[1623625691000,11.44000000],[1623625953000,11.43333333],[1623626282000,11.40000000],[1623626581000,11.40000000],[1623626871000,11.47142857],[1623627181000,11.35000000],[1623627525000,11.46000000],[1623627818000,11.50000000],[1623628142000,11.45000000],[1623628381000,11.40000000],[1623628708000,11.36000000],[1623628982000,11.28000000],[1623629281000,11.22000000],[1623629581000,11.32000000],[1623629881000,11.26000000],[1623630181000,11.24000000],[1623630482000,11.20000000],[1623630781000,11.30000000],[1623631081000,11.32000000],[1623631382000,11.32000000],[1623631681000,11.42000000],[1623631981000,11.32000000],[1623632281000,11.22000000],[1623632582000,11.28000000],[1623632881000,11.18000000],[1623633181000,11.17500000],[1623633481000,11.16000000],[1623633850000,11.18333333],[1623634185000,11.20000000],[1623634421000,11.28333333],[1623634681000,11.25000000],[1623634966000,11.22500000],[1623635340000,11.18000000],[1623635568000,11.04285714],[1623635941000,11.18000000],[1623636181000,11.23333333],[1623636465000,11.14000000],[1623636825000,11.26666667],[1623637081000,11.42000000],[1623637382000,11.52000000],[1623637681000,11.45000000],[1623637981000,11.50000000],[1623638282000,11.60000000],[1623638581000,11.87500000],[1623638852000,11.67500000],[1623639248000,11.75000000],[1623639501000,11.82000000],[1623639810000,11.92000000],[1623640108000,12.10000000],[1623640407000,12.22500000],[1623640681000,12.20000000],[1623641050000,12.10000000],[1623641264000,11.94000000],[1623641612000,11.90000000],[1623641881000,11.95000000],[1623642204000,12.02000000],[1623642481000,12.06000000],[1623642781000,12.08000000],[1623643081000,11.94000000],[1623643381000,11.92000000],[1623643682000,12.06000000],[1623644041000,12.06666667],[1623644281000,12.14000000],[1623644613000,12.67500000],[1623644953000,13.44000000],[1623645241000,13.96000000],[1623645481000,14.04000000],[1623645781000,14.28000000],[1623646082000,14.46000000],[1623646381000,14.58000000],[1623646718000,14.88000000],[1623647041000,14.80000000],[1623647372000,14.75000000],[1623647563000,15.02500000],[1623647919000,15.27500000],[1623648216000,15.58333333],[1623648481000,15.67500000],[1623648782000,15.60000000],[1623649082000,16.12000000],[1623649381000,16.34000000],[1623649681000,16.10000000],[1623649982000,16.44000000],[1623650281000,16.86000000],[1623650581000,16.74000000],[1623650882000,16.54000000],[1623651213000,16.85000000],[1623651541000,16.65000000],[1623651781000,16.52500000],[1623652081000,16.28000000],[1623652507000,16.80000000],[1623652681000,17.03333333],[1623653028000,16.60000000],[1623653281000,16.46000000],[1623653556000,17.46666667],[1623653892000,18.08000000],[1623654182000,18.22500000],[1623654481000,17.42000000],[1623654781000,17.06000000],[1623655113000,17.67500000],[1623655399000,16.86000000],[1623655727000,16.36000000],[1623656051000,16.60000000],[1623656250000,16.56666667],[1623656581000,16.85000000],[1623656855000,17.06000000],[1623657302000,17.00000000],[1623657481000,16.96666667],[1623657801000,17.56000000],[1623658090000,17.60000000],[1623658403000,18.40000000],[1623658682000,18.95000000],[1623658950000,18.98000000],[1623659317000,18.02500000],[1623659569000,18.36000000],[1623659901000,18.56000000],[1623660181000,18.60000000],[1623660481000,18.34000000],[1623660781000,18.40000000],[1623661082000,18.42000000],[1623661382000,18.60000000],[1623661681000,18.72000000],[1623661981000,19.04000000],[1623662282000,19.24000000],[1623662581000,18.76000000],[1623662881000,19.18000000],[1623663182000,19.06000000],[1623663481000,19.12000000],[1623663781000,19.08000000],[1623664081000,19.30000000],[1623664382000,19.68000000],[1623664681000,19.34000000],[1623664981000,19.80000000],[1623665281000,19.22000000],[1623665582000,19.30000000],[1623665881000,19.70000000],[1623666181000,19.72000000],[1623666481000,19.36000000],[1623666781000,19.60000000],[1623667081000,19.98000000],[1623667382000,19.58000000],[1623667681000,20.04000000],[1623667981000,20.02000000],[1623668293000,20.42000000],[1623668582000,20.90000000],[1623668881000,20.44000000],[1623669181000,19.98000000],[1623669482000,20.20000000],[1623669781000,20.30000000],[1623670081000,20.32000000],[1623670382000,20.48000000],[1623670681000,20.62000000],[1623670982000,20.56000000],[1623671281000,20.56000000],[1623671581000,20.24000000],[1623671882000,19.92000000],[1623672181000,20.80000000],[1623672481000,20.82000000],[1623672781000,20.98000000],[1623673082000,21.30000000],[1623673381000,20.92000000],[1623673681000,20.32000000],[1623673982000,20.48000000],[1623674281000,21.32000000],[1623674581000,21.86000000],[1623674882000,21.92000000],[1623675181000,20.68000000],[1623675482000,21.24000000],[1623675781000,21.42000000],[1623676081000,21.76000000],[1623676382000,21.60000000],[1623676681000,21.96000000],[1623676981000,20.76000000],[1623677282000,21.84000000],[1623677581000,22.72000000],[1623677881000,22.42000000],[1623678182000,22.20000000],[1623678481000,21.88000000],[1623678782000,21.44000000],[1623679081000,21.60000000],[1623679381000,22.00000000],[1623679682000,21.94000000],[1623679982000,21.78000000],[1623680281000,21.92000000],[1623680581000,21.96000000],[1623680881000,21.58000000],[1623681182000,21.76000000],[1623681482000,21.66000000],[1623681781000,21.90000000],[1623682081000,21.66000000],[1623682381000,21.44000000],[1623682682000,21.72000000],[1623682981000,21.68000000],[1623683281000,21.84000000],[1623683582000,21.78000000],[1623683881000,22.52000000],[1623684181000,22.76000000],[1623684481000,23.02000000],[1623684782000,22.74000000],[1623685081000,22.32000000],[1623685381000,22.56000000],[1623685681000,22.88000000],[1623685981000,23.22000000],[1623686281000,23.08000000],[1623686581000,22.48000000],[1623686881000,22.84000000],[1623687181000,22.80000000],[1623687482000,22.34000000],[1623687781000,22.26000000],[1623688082000,22.18000000],[1623688381000,22.46000000],[1623688690000,22.40000000],[1623688981000,22.02000000],[1623689281000,21.02000000],[1623689593000,20.12000000],[1623689881000,20.10000000],[1623690181000,20.24000000],[1623690482000,20.04000000],[1623690782000,19.68000000],[1623691081000,19.54000000],[1623691381000,19.58000000],[1623691682000,19.30000000],[1623691982000,19.52000000],[1623692281000,19.58000000],[1623692582000,19.30000000],[1623692881000,19.52000000],[1623693181000,19.02000000],[1623693481000,18.72000000],[1623693781000,18.46000000],[1623694082000,18.30000000],[1623694382000,18.06000000],[1623694681000,17.96000000],[1623694982000,17.92000000],[1623695281000,17.90000000],[1623695581000,17.86000000],[1623695882000,17.62000000],[1623696182000,17.40000000],[1623696481000,17.60000000],[1623696781000,17.70000000],[1623697082000,17.58000000],[1623697381000,17.46000000],[1623697681000,17.30000000],[1623697982000,17.22000000],[1623698281000,16.98000000],[1623698581000,16.88000000],[1623698882000,17.00000000],[1623699181000,17.06000000],[1623699481000,17.14000000],[1623699781000,16.88000000],[1623700082000,16.82000000],[1623700381000,16.74000000],[1623700681000,16.74000000],[1623700981000,16.88000000],[1623701282000,16.76000000],[1623701581000,16.60000000],[1623701881000,15.92000000],[1623702182000,15.40000000],[1623702481000,15.14000000],[1623702806000,14.44000000],[1623703082000,14.26666667],[1623703351000,14.15714286],[1623703682000,13.96666667],[1623704064000,13.81428571],[1623704317000,14.72000000],[1623704581000,15.76000000],[1623704881000,16.07500000],[1623705182000,16.12000000],[1623705481000,16.24000000],[1623705781000,16.42000000],[1623706081000,16.50000000],[1623706381000,16.34000000],[1623706681000,16.20000000],[1623706981000,16.10000000],[1623707281000,15.24000000],[1623707581000,14.34000000],[1623707882000,14.55000000],], 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); }); $('.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; }