var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1623535202000,17.56666667],[1623535381000,17.54000000],[1623535681000,17.50000000],[1623535982000,17.42000000],[1623536281000,17.46000000],[1623536581000,17.48000000],[1623536881000,17.58000000],[1623537181000,17.82000000],[1623537481000,17.66000000],[1623537782000,17.26000000],[1623538081000,16.88000000],[1623538381000,16.54000000],[1623538681000,16.40000000],[1623538982000,16.28000000],[1623539281000,16.10000000],[1623539581000,16.20000000],[1623539882000,16.08000000],[1623540181000,15.96000000],[1623540481000,15.88000000],[1623540781000,15.82000000],[1623541082000,15.72000000],[1623541382000,15.70000000],[1623541681000,15.54000000],[1623541981000,15.42000000],[1623542282000,15.30000000],[1623542581000,15.18000000],[1623542881000,15.12000000],[1623543181000,14.96000000],[1623543482000,14.90000000],[1623543781000,15.12000000],[1623544081000,14.92000000],[1623544381000,14.96000000],[1623544681000,14.80000000],[1623544981000,14.54000000],[1623545282000,14.16000000],[1623545581000,13.92000000],[1623545881000,13.84000000],[1623546182000,13.72000000],[1623546481000,13.60000000],[1623546781000,13.78000000],[1623547081000,13.82000000],[1623547381000,14.00000000],[1623547681000,13.94000000],[1623547982000,13.90000000],[1623548281000,13.92000000],[1623548581000,14.14000000],[1623548881000,13.94000000],[1623549181000,13.40000000],[1623549482000,13.22000000],[1623549781000,13.22000000],[1623550081000,13.20000000],[1623550382000,13.32000000],[1623550681000,12.38000000],[1623550981000,12.14000000],[1623551282000,12.14000000],[1623551581000,11.96000000],[1623551881000,11.70000000],[1623552181000,11.72000000],[1623552481000,12.08000000],[1623552781000,12.22000000],[1623553081000,11.84000000],[1623553382000,11.72000000],[1623553681000,11.82000000],[1623553981000,11.92000000],[1623554281000,12.22000000],[1623554582000,12.66000000],[1623554881000,12.14000000],[1623555181000,11.86000000],[1623555481000,11.90000000],[1623555781000,11.90000000],[1623556081000,12.00000000],[1623556382000,12.04000000],[1623556681000,12.22000000],[1623556981000,12.32000000],[1623557281000,12.48000000],[1623557582000,12.78000000],[1623557881000,13.08000000],[1623558181000,13.44000000],[1623558481000,13.72000000],[1623558781000,14.28000000],[1623559081000,14.50000000],[1623559382000,14.46000000],[1623559681000,14.72000000],[1623559981000,14.96000000],[1623560282000,15.18000000],[1623560581000,15.22000000],[1623560881000,15.38000000],[1623561181000,15.42000000],[1623561481000,16.08000000],[1623561782000,16.88000000],[1623562081000,16.82000000],[1623562381000,16.10000000],[1623562682000,15.78000000],[1623562981000,16.44000000],[1623563281000,16.22000000],[1623563582000,16.24000000],[1623563881000,15.98000000],[1623564182000,16.40000000],[1623564481000,16.84000000],[1623564781000,16.42000000],[1623565121000,16.15000000],[1623565370000,16.16000000],[1623565742000,15.96666667],[1623566021000,15.98000000],[1623566281000,16.05000000],[1623566553000,16.20000000],[1623566890000,16.44000000],[1623567241000,16.90000000],[1623567490000,17.32000000],[1623567781000,17.30000000],[1623568081000,17.30000000],[1623568382000,17.84000000],[1623568681000,17.70000000],[1623568950000,17.75000000],[1623569264000,18.00000000],[1623569581000,17.54000000],[1623569882000,18.18000000],[1623570181000,17.90000000],[1623570503000,17.56000000],[1623570781000,16.72000000],[1623571081000,17.05000000],[1623571352000,17.72000000],[1623571741000,16.70000000],[1623572051000,16.66000000],[1623572281000,16.88000000],[1623572593000,17.20000000],[1623572941000,17.60000000],[1623573242000,17.40000000],[1623573493000,17.47500000],[1623573755000,18.47500000],[1623574053000,18.18000000],[1623574442000,18.16666667],[1623574663000,18.32000000],[1623574955000,18.50000000],[1623575281000,18.14000000],[1623575581000,17.92000000],[1623575881000,17.92000000],[1623576181000,17.92000000],[1623576482000,17.74000000],[1623576781000,17.60000000],[1623577081000,17.82000000],[1623577382000,18.24000000],[1623577681000,18.20000000],[1623577981000,18.34000000],[1623578282000,18.86000000],[1623578581000,19.22000000],[1623578893000,18.40000000],[1623579182000,17.30000000],[1623579481000,17.74000000],[1623579781000,18.26000000],[1623580082000,18.40000000],[1623580381000,17.94000000],[1623580681000,18.16000000],[1623580982000,18.00000000],[1623581281000,18.04000000],[1623581581000,18.24000000],[1623581882000,18.12000000],[1623582181000,18.26000000],[1623582481000,18.88000000],[1623582781000,18.82000000],[1623583082000,18.98000000],[1623583381000,17.92000000],[1623583682000,17.72000000],[1623583982000,17.98000000],[1623584281000,18.40000000],[1623584590000,18.90000000],[1623584882000,18.02000000],[1623585181000,18.72000000],[1623585481000,19.70000000],[1623585782000,19.50000000],[1623586081000,18.40000000],[1623586381000,18.00000000],[1623586682000,18.74000000],[1623586981000,18.92000000],[1623587281000,18.96000000],[1623587581000,19.38000000],[1623587882000,19.18000000],[1623588181000,19.60000000],[1623588481000,19.24000000],[1623588781000,19.32000000],[1623589082000,20.06000000],[1623589381000,19.60000000],[1623589681000,19.10000000],[1623589981000,19.80000000],[1623590281000,20.20000000],[1623590581000,20.00000000],[1623590881000,20.04000000],[1623591181000,19.06000000],[1623591482000,18.86000000],[1623591781000,18.02000000],[1623592081000,18.12000000],[1623592381000,18.24000000],[1623592682000,17.98000000],[1623592981000,17.76000000],[1623593281000,17.70000000],[1623593581000,18.18000000],[1623593881000,18.44000000],[1623594181000,18.36000000],[1623594481000,18.46000000],[1623594781000,18.36000000],[1623595082000,17.86000000],[1623595381000,17.92000000],[1623595681000,18.32000000],[1623595982000,18.76000000],[1623596282000,18.00000000],[1623596581000,17.54000000],[1623596881000,17.18000000],[1623597181000,17.44000000],[1623597481000,17.88000000],[1623597782000,17.62000000],[1623598081000,18.06000000],[1623598382000,17.96000000],[1623598681000,17.16000000],[1623598981000,17.80000000],[1623599282000,18.38000000],[1623599581000,18.72000000],[1623599881000,18.40000000],[1623600181000,17.48000000],[1623600482000,16.78000000],[1623600781000,16.88000000],[1623601081000,17.02000000],[1623601382000,16.38000000],[1623601681000,16.34000000],[1623601982000,16.06000000],[1623602281000,15.96000000],[1623602581000,16.16000000],[1623602882000,16.16000000],[1623603181000,16.08000000],[1623603481000,16.16000000],[1623603781000,15.98000000],[1623604082000,15.92000000],[1623604381000,15.92000000],[1623604681000,15.84000000],[1623604982000,15.94000000],[1623605281000,15.64000000],[1623605581000,15.88000000],[1623605881000,15.50000000],[1623606182000,15.46000000],[1623606481000,15.46000000],[1623606781000,15.10000000],[1623607081000,14.96000000],[1623607381000,14.76000000],[1623607681000,14.68000000],[1623607981000,14.48000000],[1623608281000,14.40000000],[1623608582000,14.32000000],[1623608882000,14.52000000],[1623609181000,14.28000000],[1623609481000,14.22000000],[1623609782000,14.08000000],[1623610081000,13.88000000],[1623610381000,13.98000000],[1623610681000,13.96000000],[1623610981000,13.94000000],[1623611281000,13.74000000],[1623611582000,13.16000000],[1623611881000,13.18000000],[1623612181000,13.36000000],[1623612482000,13.08000000],[1623612781000,13.00000000],[1623613081000,13.08000000],[1623613381000,12.76000000],[1623613681000,12.98000000],[1623613981000,12.80000000],[1623614281000,12.62000000],[1623614582000,13.12000000],[1623614881000,13.14000000],[1623615181000,13.18000000],[1623615481000,12.82000000],[1623615781000,12.78000000],[1623616082000,12.86000000],[1623616381000,12.58000000],[1623616681000,12.26000000],[1623616981000,12.34000000],[1623617282000,12.34000000],[1623617581000,11.92000000],[1623617881000,11.72000000],[1623618181000,11.68000000],[1623618481000,12.28000000],[1623618782000,12.12000000],[1623619081000,11.96000000],[1623619381000,12.04000000],[1623619729000,12.20000000],[1623619981000,12.20000000],[1623620310000,12.23333333],[1623620550000,12.11666667],[1623620919000,12.04000000],[1623621332000,11.93333333],[1623621450000,11.82500000],], 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; }