var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1627855201000,16.33333333],[1627855381000,16.32000000],[1627855681000,16.34000000],[1627855982000,16.38000000],[1627856281000,16.44000000],[1627856581000,16.40000000],[1627856882000,16.32000000],[1627857181000,16.32000000],[1627857481000,16.28000000],[1627857782000,16.46000000],[1627858082000,16.42000000],[1627858382000,16.38000000],[1627858681000,16.34000000],[1627858981000,16.24000000],[1627859282000,16.10000000],[1627859581000,16.04000000],[1627859881000,15.92000000],[1627860181000,15.90000000],[1627860482000,15.86000000],[1627860782000,15.78000000],[1627861081000,15.66000000],[1627861381000,15.52000000],[1627861682000,15.26000000],[1627861981000,15.16000000],[1627862284000,15.00000000],[1627862582000,14.86000000],[1627862882000,14.80000000],[1627863181000,14.76000000],[1627863481000,14.66000000],[1627863782000,14.68000000],[1627864082000,14.66000000],[1627864381000,14.48000000],[1627864682000,14.52000000],[1627864982000,14.72000000],[1627865281000,14.48000000],[1627865581000,14.36000000],[1627865882000,14.40000000],[1627866181000,14.62000000],[1627866481000,14.64000000],[1627866782000,14.58000000],[1627867082000,14.26000000],[1627867381000,14.10000000],[1627867682000,14.06000000],[1627867982000,14.00000000],[1627868281000,14.00000000],[1627868581000,14.00000000],[1627868882000,14.04000000],[1627869181000,14.02000000],[1627869481000,13.92000000],[1627869782000,13.76000000],[1627870083000,13.62000000],[1627870381000,13.56000000],[1627870681000,13.62000000],[1627870982000,13.64000000],[1627871281000,13.70000000],[1627871581000,13.76000000],[1627871882000,14.04000000],[1627872181000,14.60000000],[1627872482000,14.60000000],[1627872781000,14.48000000],[1627873081000,14.40000000],[1627873382000,14.40000000],[1627873681000,14.40000000],[1627873981000,14.34000000],[1627874281000,14.56000000],[1627874582000,14.40000000],[1627874882000,14.26000000],[1627875181000,14.26000000],[1627875482000,14.22000000],[1627875782000,14.44000000],[1627876081000,14.60000000],[1627876382000,14.78000000],[1627876682000,14.76000000],[1627876981000,14.76000000],[1627877281000,14.64000000],[1627877581000,14.66000000],[1627877882000,14.70000000],[1627878181000,14.78000000],[1627878481000,14.94000000],[1627878782000,15.36000000],[1627879082000,15.68000000],[1627879381000,15.80000000],[1627879681000,16.02000000],[1627879982000,16.10000000],[1627880281000,16.04000000],[1627880581000,16.28000000],[1627880882000,16.74000000],[1627881181000,16.90000000],[1627881481000,17.02000000],[1627881781000,17.26000000],[1627882082000,16.94000000],[1627882381000,16.92000000],[1627882681000,16.80000000],[1627882982000,16.64000000],[1627883281000,16.86000000],[1627883581000,17.08000000],[1627883882000,17.14000000],[1627884182000,17.48000000],[1627884481000,18.16000000],[1627884782000,17.72000000],[1627885081000,17.58000000],[1627885381000,17.78000000],[1627885682000,17.84000000],[1627885981000,18.06000000],[1627886281000,18.10000000],[1627886582000,18.28000000],[1627886881000,18.50000000],[1627887181000,18.48000000],[1627887482000,18.62500000],[1627887782000,18.84000000],[1627888082000,18.75000000],[1627888382000,18.84000000],[1627888681000,19.14000000],[1627888983000,19.40000000],[1627889282000,19.30000000],[1627889582000,19.48000000],[1627889882000,19.87500000],[1627890241000,19.92500000],[1627890481000,19.95000000],[1627890781000,20.30000000],[1627891083000,20.55000000],[1627891442000,20.72500000],[1627891682000,20.55000000],[1627891981000,20.62500000],[1627892281000,20.72500000],[1627892583000,20.58000000],[1627892883000,20.60000000],[1627893183000,21.10000000],[1627893483000,20.97500000],[1627893783000,21.44000000],[1627894083000,21.74000000],[1627894382000,21.52000000],[1627894682000,21.66000000],[1627894983000,21.86000000],[1627895281000,21.45000000],[1627895643000,21.72500000],[1627895881000,21.52000000],[1627896183000,20.64000000],[1627896483000,20.94000000],[1627896843000,21.20000000],[1627897083000,22.04000000],[1627897381000,21.10000000],[1627897683000,21.30000000],[1627897983000,21.76000000],[1627898281000,22.36000000],[1627898581000,22.60000000],[1627898883000,22.25000000],[1627899183000,21.62000000],[1627899481000,21.52000000],[1627899781000,22.08000000],[1627900082000,21.92000000],[1627900381000,22.60000000],[1627900681000,22.44000000],[1627900981000,23.08000000],[1627901282000,22.84000000],[1627901582000,22.88000000],[1627901883000,22.04000000],[1627902183000,21.86000000],[1627902482000,22.00000000],[1627902843000,21.92500000],[1627903081000,22.42000000],[1627903382000,23.52000000],[1627903681000,22.86000000],[1627903983000,21.47500000],[1627904283000,22.05000000],[1627904581000,22.64000000],[1627904883000,22.54000000],[1627905182000,22.54000000],[1627905482000,21.58000000],[1627905783000,21.25000000],[1627906141000,21.40000000],[1627906382000,21.68000000],[1627906682000,21.24000000],[1627906983000,21.20000000],[1627907283000,21.72500000],[1627907581000,21.90000000],[1627907883000,22.72000000],[1627908181000,23.04000000],[1627908482000,23.24000000],[1627908781000,23.02500000],[1627909142000,23.00000000],[1627909382000,22.74000000],[1627909683000,22.90000000],[1627909981000,23.40000000],[1627910281000,22.96000000],[1627910582000,23.06000000],[1627910881000,23.48000000],[1627911182000,23.25000000],[1627911482000,23.10000000],[1627911782000,23.08000000],[1627912082000,22.96000000],[1627912382000,23.74000000],[1627912683000,24.04000000],[1627913043000,23.36666667],[1627913282000,23.27500000],[1627913643000,23.57500000],[1627913882000,23.70000000],[1627914181000,23.70000000],[1627914483000,23.00000000],[1627914781000,23.28000000],[1627915082000,23.58000000],[1627915441000,23.55000000],[1627915681000,23.20000000],[1627915983000,22.75000000],[1627916281000,22.40000000],[1627916643000,22.03333333],[1627916883000,21.96000000],[1627917242000,22.12500000],[1627917483000,22.58000000],[1627917841000,22.60000000],[1627918083000,22.23333333],[1627918382000,22.36000000],[1627918681000,22.35000000],[1627918981000,22.52500000],[1627919282000,22.52500000],[1627919643000,22.60000000],[1627919882000,22.65000000],[1627920181000,22.95000000],[1627920481000,22.78000000],[1627920781000,22.55000000],[1627921083000,22.54000000],[1627921383000,22.72000000],[1627921683000,22.70000000],[1627921983000,22.53333333],[1627922282000,22.40000000],[1627922643000,22.16666667],[1627922881000,22.20000000],[1627923183000,21.88000000],[1627923481000,21.42000000],[1627923782000,21.16000000],[1627924081000,20.98000000],[1627924443000,20.85000000],[1627924683000,20.80000000],[1627924981000,20.60000000],[1627925283000,20.36000000],[1627925582000,20.32000000],[1627925882000,20.20000000],[1627926183000,19.98000000],[1627926483000,19.62000000],[1627926782000,19.28000000],[1627927082000,19.02500000],[1627927381000,18.90000000],[1627927742000,18.90000000],[1627928043000,18.92500000],[1627928281000,18.87500000],[1627928583000,18.76000000],[1627928882000,18.54000000],[1627929303000,18.26666667],[1627929542000,18.25000000],[1627929782000,18.26000000],[1627930083000,18.64000000],[1627930383000,18.16000000],[1627930683000,17.62000000],[1627930982000,17.57500000],[1627931282000,17.64000000],[1627931581000,17.38000000],[1627931881000,17.55000000],[1627932183000,17.70000000],[1627932482000,17.54000000],[1627932781000,17.50000000],[1627933083000,18.18000000],[1627933382000,17.70000000],[1627933681000,16.86000000],[1627933981000,16.78000000],[1627934282000,16.80000000],[1627934581000,16.54000000],[1627934881000,16.70000000],[1627935182000,16.36000000],[1627935482000,16.28000000],[1627935781000,16.32000000],[1627936081000,16.12000000],[1627936382000,15.46000000],[1627936681000,15.26000000],[1627936982000,15.16000000],[1627937281000,15.10000000],[1627937581000,15.00000000],[1627937882000,15.06000000],[1627938182000,14.92000000],[1627938482000,14.84000000],[1627938782000,14.90000000],[1627939081000,14.96000000],[1627939381000,14.72000000],[1627939682000,14.72000000],[1627939982000,15.14000000],[1627940281000,14.94000000],[1627940581000,14.36000000],[1627940881000,14.12000000],[1627941182000,14.10000000],[1627941481000,14.10000000],], 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; }