var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1786140000000,7.70000000],[1786140180000,7.62000000],[1786140480000,7.60000000],[1786140780000,7.56000000],[1786141080000,7.50000000],[1786141380000,7.46000000],[1786141680000,7.40000000],[1786141980000,7.44000000],[1786142280000,7.50000000],[1786142580000,7.42000000],[1786142880000,7.26000000],[1786143180000,7.12000000],[1786143480000,7.06000000],[1786143780000,7.00000000],[1786144080000,7.00000000],[1786144380000,6.96000000],[1786144680000,6.90000000],[1786144980000,6.86000000],[1786145280000,6.80000000],[1786145580000,6.76000000],[1786145880000,6.70000000],[1786146180000,6.66000000],[1786146480000,6.50000000],[1786146780000,6.50000000],[1786147080000,6.48000000],[1786147380000,6.36000000],[1786147680000,6.16000000],[1786147980000,6.04000000],[1786148280000,5.70000000],[1786148580000,5.30000000],[1786148880000,5.00000000],[1786149180000,4.36000000],[1786149480000,4.12000000],[1786149780000,4.36000000],[1786150080000,4.50000000],[1786150380000,4.26000000],[1786150680000,4.32000000],[1786150980000,4.78000000],[1786151280000,4.94000000],[1786151580000,4.64000000],[1786151880000,4.88000000],[1786152180000,5.48000000],[1786152480000,5.34000000],[1786152780000,4.98000000],[1786153080000,4.72000000],[1786153380000,3.62000000],[1786153680000,2.96000000],[1786153980000,2.84000000],[1786154280000,2.80000000],[1786154580000,2.78000000],[1786154880000,2.78000000],[1786155180000,2.80000000],[1786155480000,2.76000000],[1786155780000,2.80000000],[1786156080000,2.76000000],[1786156380000,2.66000000],[1786156680000,2.60000000],[1786156980000,2.62000000],[1786157280000,2.54000000],[1786157580000,2.42000000],[1786157880000,2.30000000],[1786158180000,2.28000000],[1786158480000,2.20000000],[1786158780000,2.22000000],[1786159080000,2.20000000],[1786159380000,2.14000000],[1786159680000,2.10000000],[1786159980000,2.00000000],[1786160280000,1.96000000],[1786160580000,1.90000000],[1786160880000,1.84000000],[1786161180000,1.80000000],[1786161480000,1.80000000],[1786161780000,1.74000000],[1786162080000,1.76000000],[1786162380000,1.76000000],[1786162680000,1.74000000],[1786162980000,1.86000000],[1786163280000,1.86000000],[1786163580000,1.80000000],[1786163880000,1.76000000],[1786164180000,1.74000000],[1786164480000,1.80000000],[1786164780000,1.86000000],[1786165080000,1.96000000],[1786165380000,2.00000000],[1786165680000,2.00000000],[1786165980000,1.84000000],[1786166280000,1.58000000],[1786166580000,1.48000000],[1786166880000,1.54000000],[1786167180000,1.50000000],[1786167480000,1.56000000],[1786167780000,1.58000000],[1786168080000,1.60000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1786140000000,7.7],[1786140180000,7.6],[1786140480000,7.6],[1786140780000,7.6],[1786141080000,7.5],[1786141380000,7.5],[1786141680000,7.4],[1786141980000,7.4],[1786142280000,7.5],[1786142580000,7.4],[1786142880000,7.3],[1786143180000,7.1],[1786143480000,7.1],[1786143780000,7],[1786144080000,7],[1786144380000,7],[1786144680000,6.9],[1786144980000,6.9],[1786145280000,6.8],[1786145580000,6.8],[1786145880000,6.7],[1786146180000,6.7],[1786146480000,6.5],[1786146780000,6.5],[1786147080000,6.5],[1786147380000,6.4],[1786147680000,5.6],[1786147980000,6],[1786148280000,5.7],[1786148580000,3.8],[1786148880000,2.5],[1786149180000,4.2],[1786149480000,0.8],[1786149780000,-3.6],[1786150080000,-0],[1786150380000,1.8],[1786150680000,-4.8],[1786150980000,-7.5],[1786151280000,-1.3],[1786151580000,-5.4],[1786151880000,-7.9],[1786152180000,-11.2],[1786152480000,-5.1],[1786152780000,-8.8],[1786153080000,0.3],[1786153380000,3.6],[1786153680000,3],[1786153980000,2.8],[1786154280000,2.8],[1786154580000,2.8],[1786154880000,2.8],[1786155180000,2.8],[1786155480000,2.8],[1786155780000,2.8],[1786156080000,2.8],[1786156380000,2.7],[1786156680000,2.6],[1786156980000,2.6],[1786157280000,2.5],[1786157580000,2.4],[1786157880000,2.3],[1786158180000,2.3],[1786158480000,2.2],[1786158780000,2.2],[1786159080000,2.2],[1786159380000,2.1],[1786159680000,2.1],[1786159980000,2],[1786160280000,2],[1786160580000,1.9],[1786160880000,1.8],[1786161180000,1.8],[1786161480000,1.8],[1786161780000,1.7],[1786162080000,1.8],[1786162380000,1.8],[1786162680000,1.7],[1786162980000,1.9],[1786163280000,1.9],[1786163580000,1.8],[1786163880000,1.8],[1786164180000,1.7],[1786164480000,1.8],[1786164780000,1.9],[1786165080000,2],[1786165380000,2],[1786165680000,2],[1786165980000,1.8],[1786166280000,1.6],[1786166580000,1.5],[1786166880000,1.5],[1786167180000,1.5],[1786167480000,1.6],[1786167780000,1.6],[1786168080000,1.6],], 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: 'Vlhkosť (%)', data: [[1786140000000,100.00000000],[1786140180000,100.00000000],[1786140480000,100.00000000],[1786140780000,100.00000000],[1786141080000,100.00000000],[1786141380000,100.00000000],[1786141680000,100.00000000],[1786141980000,100.00000000],[1786142280000,100.00000000],[1786142580000,100.00000000],[1786142880000,100.00000000],[1786143180000,100.00000000],[1786143480000,100.00000000],[1786143780000,100.00000000],[1786144080000,100.00000000],[1786144380000,100.00000000],[1786144680000,100.00000000],[1786144980000,100.00000000],[1786145280000,100.00000000],[1786145580000,100.00000000],[1786145880000,100.00000000],[1786146180000,100.00000000],[1786146480000,100.00000000],[1786146780000,100.00000000],[1786147080000,100.00000000],[1786147380000,100.00000000],[1786147680000,96.36000000],[1786147980000,100.00000000],[1786148280000,100.00000000],[1786148580000,90.12000000],[1786148880000,83.82000000],[1786149180000,98.80000000],[1786149480000,79.48000000],[1786149780000,56.80000000],[1786150080000,72.64000000],[1786150380000,84.50000000],[1786150680000,51.78000000],[1786150980000,40.98000000],[1786151280000,64.40000000],[1786151580000,48.44000000],[1786151880000,39.30000000],[1786152180000,29.10000000],[1786152480000,47.42000000],[1786152780000,36.60000000],[1786153080000,73.54000000],[1786153380000,100.00000000],[1786153680000,100.00000000],[1786153980000,100.00000000],[1786154280000,100.00000000],[1786154580000,100.00000000],[1786154880000,100.00000000],[1786155180000,100.00000000],[1786155480000,100.00000000],[1786155780000,100.00000000],[1786156080000,100.00000000],[1786156380000,100.00000000],[1786156680000,100.00000000],[1786156980000,100.00000000],[1786157280000,100.00000000],[1786157580000,100.00000000],[1786157880000,100.00000000],[1786158180000,100.00000000],[1786158480000,100.00000000],[1786158780000,100.00000000],[1786159080000,100.00000000],[1786159380000,100.00000000],[1786159680000,100.00000000],[1786159980000,100.00000000],[1786160280000,100.00000000],[1786160580000,100.00000000],[1786160880000,100.00000000],[1786161180000,100.00000000],[1786161480000,100.00000000],[1786161780000,100.00000000],[1786162080000,100.00000000],[1786162380000,100.00000000],[1786162680000,100.00000000],[1786162980000,100.00000000],[1786163280000,100.00000000],[1786163580000,100.00000000],[1786163880000,100.00000000],[1786164180000,100.00000000],[1786164480000,100.00000000],[1786164780000,100.00000000],[1786165080000,100.00000000],[1786165380000,100.00000000],[1786165680000,100.00000000],[1786165980000,100.00000000],[1786166280000,100.00000000],[1786166580000,100.00000000],[1786166880000,100.00000000],[1786167180000,100.00000000],[1786167480000,100.00000000],[1786167780000,100.00000000],[1786168080000,100.00000000],], color: '#ff9000' } ]; var options = { xaxes: [{ axisLabel: 'humidity', }], 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%' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-humidity-legend' } }; graphs['#chart-humidity'] = $.plot('#chart-humidity', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Rýchlosť vetra (km/h)', data: [[1786140000000,6.48],[1786140180000,6.12],[1786140480000,7.776],[1786140780000,5.04],[1786141080000,4.824],[1786141380000,5.04],[1786141680000,3.312],[1786141980000,5.112],[1786142280000,4.032],[1786142580000,5.544],[1786142880000,4.824],[1786143180000,6.12],[1786143480000,6.696],[1786143780000,8.424],[1786144080000,8.568],[1786144380000,5.76],[1786144680000,8.136],[1786144980000,11.448],[1786145280000,11.16],[1786145580000,7.128],[1786145880000,14.544],[1786146180000,9.504],[1786146480000,12.528],[1786146780000,4.536],[1786147080000,7.56],[1786147380000,9.144],[1786147680000,8.928],[1786147980000,7.704],[1786148280000,8.784],[1786148580000,12.384],[1786148880000,14.4],[1786149180000,11.232],[1786149480000,6.984],[1786149780000,7.416],[1786150080000,8.928],[1786150380000,14.616],[1786150680000,12.312],[1786150980000,8.352],[1786151280000,13.536],[1786151580000,12.312],[1786151880000,11.52],[1786152180000,17.568],[1786152480000,24.192],[1786152780000,27.936],[1786153080000,25.776],[1786153380000,28.944],[1786153680000,30.096],[1786153980000,30.6],[1786154280000,27.72],[1786154580000,25.128],[1786154880000,26.568],[1786155180000,25.92],[1786155480000,24.48],[1786155780000,25.2],[1786156080000,27.144],[1786156380000,29.088],[1786156680000,31.104],[1786156980000,36.072],[1786157280000,35.928],[1786157580000,40.392],[1786157880000,41.328],[1786158180000,43.2],[1786158480000,42.84],[1786158780000,43.272],[1786159080000,42.84],[1786159380000,41.688],[1786159680000,45.144],[1786159980000,42.624],[1786160280000,46.584],[1786160580000,44.424],[1786160880000,42.048],[1786161180000,39.528],[1786161480000,37.944],[1786161780000,39.6],[1786162080000,37.944],[1786162380000,40.248],[1786162680000,40.176],[1786162980000,38.304],[1786163280000,39.024],[1786163580000,36.504],[1786163880000,37.584],[1786164180000,33.768],[1786164480000,31.896],[1786164780000,29.88],[1786165080000,31.752],[1786165380000,32.4],[1786165680000,37.224],[1786165980000,37.008],[1786166280000,38.52],[1786166580000,39.744],[1786166880000,38.376],[1786167180000,39.168],[1786167480000,37.152],[1786167780000,38.664],[1786168080000,37.08],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1786140000000,9.479999988],[1786140180000,11.232],[1786140480000,11.448],[1786140780000,8.928],[1786141080000,10.728],[1786141380000,10.008],[1786141680000,6.984],[1786141980000,8.784],[1786142280000,9.432],[1786142580000,9.792],[1786142880000,8.136],[1786143180000,9.648],[1786143480000,10.224],[1786143780000,11.232],[1786144080000,12.168],[1786144380000,10.368],[1786144680000,13.896],[1786144980000,16.128],[1786145280000,15.696],[1786145580000,11.52],[1786145880000,16.704],[1786146180000,13.464],[1786146480000,15.696],[1786146780000,9.432],[1786147080000,11.016],[1786147380000,12.6],[1786147680000,12.024],[1786147980000,9.576],[1786148280000,12.384],[1786148580000,16.344],[1786148880000,20.52],[1786149180000,15.84],[1786149480000,13.248],[1786149780000,11.376],[1786150080000,15.408],[1786150380000,20.448],[1786150680000,17.496],[1786150980000,12.888],[1786151280000,18.648],[1786151580000,18.864],[1786151880000,17.28],[1786152180000,22.32],[1786152480000,29.736],[1786152780000,31.752],[1786153080000,30.96],[1786153380000,33.408],[1786153680000,35.352],[1786153980000,34.272],[1786154280000,32.328],[1786154580000,29.952],[1786154880000,31.464],[1786155180000,28.872],[1786155480000,28.44],[1786155780000,30.024],[1786156080000,32.184],[1786156380000,33.192],[1786156680000,35.856],[1786156980000,39.96],[1786157280000,40.464],[1786157580000,43.416],[1786157880000,44.712],[1786158180000,47.88],[1786158480000,46.224],[1786158780000,48.744],[1786159080000,47.376],[1786159380000,46.656],[1786159680000,50.184],[1786159980000,47.232],[1786160280000,50.688],[1786160580000,49.176],[1786160880000,48.096],[1786161180000,43.992],[1786161480000,43.704],[1786161780000,43.272],[1786162080000,44.856],[1786162380000,46.296],[1786162680000,46.296],[1786162980000,43.2],[1786163280000,44.784],[1786163580000,44.784],[1786163880000,42.12],[1786164180000,40.608],[1786164480000,36.864],[1786164780000,34.56],[1786165080000,35.784],[1786165380000,36.864],[1786165680000,41.4],[1786165980000,41.904],[1786166280000,43.272],[1786166580000,47.088],[1786166880000,42.912],[1786167180000,43.992],[1786167480000,42.048],[1786167780000,42.696],[1786168080000,38.88],], color: '#EF9856', points: { show: true }, lines: { show: false }, } ]; var options = { xaxes: [{ axisLabel: 'wind', }], 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.1km/h' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-wind-legend' } }; graphs['#chart-wind'] = $.plot('#chart-wind', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Smer vetra', data: [[1786140000000,250.40000000],[1786140180000,270.46000000],[1786140480000,227.10000000],[1786140780000,269.18000000],[1786141080000,262.72000000],[1786141380000,248.56000000],[1786141680000,283.82000000],[1786141980000,234.10000000],[1786142280000,273.38000000],[1786142580000,281.20000000],[1786142880000,269.66000000],[1786143180000,250.08000000],[1786143480000,225.66000000],[1786143780000,228.36000000],[1786144080000,242.18000000],[1786144380000,271.16000000],[1786144680000,252.90000000],[1786144980000,245.16000000],[1786145280000,224.42000000],[1786145580000,233.56000000],[1786145880000,239.24000000],[1786146180000,270.74000000],[1786146480000,225.42000000],[1786146780000,247.14000000],[1786147080000,248.80000000],[1786147380000,255.80000000],[1786147680000,237.10000000],[1786147980000,226.76000000],[1786148280000,283.40000000],[1786148580000,294.88000000],[1786148880000,311.30000000],[1786149180000,339.22000000],[1786149480000,219.16000000],[1786149780000,276.74000000],[1786150080000,290.18000000],[1786150380000,316.52000000],[1786150680000,271.34000000],[1786150980000,253.84000000],[1786151280000,312.62000000],[1786151580000,262.26000000],[1786151880000,288.32000000],[1786152180000,305.90000000],[1786152480000,308.74000000],[1786152780000,313.68000000],[1786153080000,316.92000000],[1786153380000,317.98000000],[1786153680000,321.40000000],[1786153980000,323.88000000],[1786154280000,326.70000000],[1786154580000,325.94000000],[1786154880000,328.60000000],[1786155180000,325.96000000],[1786155480000,328.64000000],[1786155780000,327.76000000],[1786156080000,330.44000000],[1786156380000,325.80000000],[1786156680000,331.02000000],[1786156980000,335.40000000],[1786157280000,331.68000000],[1786157580000,331.14000000],[1786157880000,333.06000000],[1786158180000,333.38000000],[1786158480000,332.92000000],[1786158780000,329.78000000],[1786159080000,328.32000000],[1786159380000,327.70000000],[1786159680000,330.20000000],[1786159980000,331.16000000],[1786160280000,327.78000000],[1786160580000,329.36000000],[1786160880000,330.20000000],[1786161180000,330.36000000],[1786161480000,331.44000000],[1786161780000,330.18000000],[1786162080000,336.38000000],[1786162380000,334.22000000],[1786162680000,340.04000000],[1786162980000,336.80000000],[1786163280000,337.06000000],[1786163580000,335.88000000],[1786163880000,337.20000000],[1786164180000,332.70000000],[1786164480000,335.14000000],[1786164780000,334.76000000],[1786165080000,335.80000000],[1786165380000,334.70000000],[1786165680000,336.12000000],[1786165980000,336.20000000],[1786166280000,338.32000000],[1786166580000,336.60000000],[1786166880000,336.54000000],[1786167180000,338.04000000],[1786167480000,337.00000000],[1786167780000,337.64000000],[1786168080000,334.90000000],], color: '#002f80', points: { show: true }, lines: { show: false }, } ]; var options = { xaxes: [{ axisLabel: 'wind_direction', }], xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, yaxis: { min: 0, max: 360, ticks: [[0, 'S'], [90, 'V'], [180, 'J'], [270, 'Z'], [360, 'S']] }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: function(label, xval, yval, flotItem) { dir = meteo_wind_direction_name(yval); format_date = moment(xval).format('DD.MM., hh:mm') return format_date+' - '+dir; } }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-wind-direction-legend' } }; graphs['#chart-wind-direction'] = $.plot('#chart-wind-direction', 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; }