var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1775253659000,6.95000000],[1775253915000,6.63333333],[1775254107000,6.50000000],[1775254427000,6.14000000],[1775254683000,6.54000000],[1775255003000,6.45000000],[1775255339000,6.25000000],[1775255664000,5.93333333],[1775255851000,5.70000000],[1775256171000,5.25000000],[1775256540000,5.20000000],[1775256827000,4.80000000],[1775257083000,4.55000000],[1775257387000,4.56000000],[1775257707000,4.70000000],[1775258027000,4.72000000],[1775258283000,4.55000000],[1775258603000,4.33333333],[1775258987000,4.60000000],[1775259179000,4.70000000],[1775259499000,4.70000000],[1775259947000,4.60000000],[1775260075000,4.40000000],[1775260411000,4.20000000],[1775260651000,4.02500000],[1775261004000,3.78571429],[1775261275000,3.60000000],[1775261580000,3.57142857],[1775261852000,3.71250000],[1775262203000,4.20000000],[1775262475000,4.63750000],[1775262779000,4.54285714],[1775263051000,4.42500000],[1775263403000,4.30000000],[1775263675000,4.20000000],[1775263979000,3.94285714],[1775264251000,3.93750000],[1775264604000,4.10000000],[1775264875000,4.24285714],[1775265180000,4.42857143],[1775265451000,4.91428571],[1775265803000,5.20000000],[1775266075000,5.01250000],[1775266380000,4.77142857],[1775266651000,4.62500000],[1775267003000,4.58571429],[1775267276000,5.10000000],[1775267579000,5.15714286],[1775267852000,4.83333333],[1775268203000,4.67500000],[1775268507000,4.42857143],[1775268779000,4.20000000],[1775269099000,3.96666667],[1775269611000,3.90000000],[1775269675000,3.90000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1775253659000,2.2],[1775253915000,2.1],[1775254107000,2.1],[1775254427000,2],[1775254683000,2.1],[1775255003000,2.2],[1775255339000,2],[1775255664000,2],[1775255851000,1.9],[1775256171000,1.7],[1775256540000,1.8],[1775256827000,1.7],[1775257083000,1.6],[1775257387000,1.7],[1775257707000,1.7],[1775258027000,1.7],[1775258283000,1.8],[1775258603000,1.7],[1775258987000,1.8],[1775259179000,1.8],[1775259499000,1.7],[1775259947000,1.6],[1775260075000,1.5],[1775260411000,1.4],[1775260651000,1.3],[1775261004000,1.3],[1775261275000,1.2],[1775261580000,1.3],[1775261852000,1.4],[1775262203000,1.7],[1775262475000,1.8],[1775262779000,1.7],[1775263051000,1.8],[1775263403000,1.8],[1775263675000,1.9],[1775263979000,1.8],[1775264251000,1.8],[1775264604000,1.9],[1775264875000,1.9],[1775265180000,2],[1775265451000,2.2],[1775265803000,2.2],[1775266075000,2],[1775266380000,1.9],[1775266651000,2],[1775267003000,2],[1775267276000,2.2],[1775267579000,2.1],[1775267852000,2.1],[1775268203000,2],[1775268507000,1.9],[1775268779000,1.8],[1775269099000,1.8],[1775269611000,1.7],[1775269675000,1.7],], 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: [[1775253659000,72.00000000],[1775253915000,73.00000000],[1775254107000,73.50000000],[1775254427000,75.00000000],[1775254683000,73.40000000],[1775255003000,74.50000000],[1775255339000,74.50000000],[1775255664000,76.00000000],[1775255851000,77.00000000],[1775256171000,78.25000000],[1775256540000,79.00000000],[1775256827000,80.50000000],[1775257083000,81.50000000],[1775257387000,82.00000000],[1775257707000,81.00000000],[1775258027000,81.20000000],[1775258283000,82.50000000],[1775258603000,83.00000000],[1775258987000,82.00000000],[1775259179000,81.80000000],[1775259499000,81.25000000],[1775259947000,81.00000000],[1775260075000,81.50000000],[1775260411000,82.00000000],[1775260651000,82.87500000],[1775261004000,84.00000000],[1775261275000,84.37500000],[1775261580000,85.00000000],[1775261852000,85.00000000],[1775262203000,83.71428571],[1775262475000,82.12500000],[1775262779000,82.28571429],[1775263051000,83.00000000],[1775263403000,84.00000000],[1775263675000,84.87500000],[1775263979000,86.00000000],[1775264251000,86.00000000],[1775264604000,85.83333333],[1775264875000,85.00000000],[1775265180000,84.28571429],[1775265451000,82.57142857],[1775265803000,81.00000000],[1775266075000,81.00000000],[1775266380000,82.14285714],[1775266651000,83.00000000],[1775267003000,83.42857143],[1775267276000,81.71428571],[1775267579000,81.14285714],[1775267852000,82.50000000],[1775268203000,83.00000000],[1775268507000,83.71428571],[1775268779000,84.50000000],[1775269099000,85.66666667],[1775269611000,86.00000000],[1775269675000,86.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: 'Atmosférický tlak (hPa)', data: [[1775253659000,1019.3],[1775253915000,1019.5],[1775254107000,1019.5],[1775254427000,1019.6],[1775254683000,1019.6],[1775255003000,1019.5],[1775255339000,1019.8],[1775255664000,1019.7],[1775255851000,1019.8],[1775256171000,1019.8],[1775256540000,1020],[1775256827000,1020],[1775257083000,1020],[1775257387000,1020.2],[1775257707000,1020.1],[1775258027000,1020.2],[1775258283000,1020.1],[1775258603000,1020.1],[1775258987000,1020],[1775259179000,1020],[1775259499000,1020.1],[1775259947000,1020.2],[1775260075000,1020.1],[1775260411000,1020.1],[1775260651000,1020.2],[1775261004000,1020.1],[1775261275000,1020.1],[1775261580000,1020.1],[1775261852000,1020.1],[1775262203000,1020.2],[1775262475000,1020],[1775262779000,1020],[1775263051000,1019.9],[1775263403000,1019.9],[1775263675000,1020],[1775263979000,1020.1],[1775264251000,1020.1],[1775264604000,1020.1],[1775264875000,1020],[1775265180000,1019.9],[1775265451000,1019.9],[1775265803000,1019.9],[1775266075000,1019.8],[1775266380000,1019.8],[1775266651000,1019.7],[1775267003000,1020],[1775267276000,1019.9],[1775267579000,1019.9],[1775267852000,1019.8],[1775268203000,1019.9],[1775268507000,1019.9],[1775268779000,1019.9],[1775269099000,1019.9],[1775269611000,1020],[1775269675000,1019.9],], color: '#000000' } ]; var options = { xaxes: [{ axisLabel: 'pressure', }], 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.1hPa' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-pressure-legend' } }; graphs['#chart-pressure'] = $.plot('#chart-pressure', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Rýchlosť vetra (km/h)', data: [[1775253659000,1.62],[1775253915000,1.199999988],[1775254107000,1.44],[1775254427000,2.808],[1775254683000,1.368],[1775255003000,1.26],[1775255339000,0],[1775255664000,0.119999988],[1775255851000,0.36],[1775256171000,0],[1775256540000,0],[1775256827000,0],[1775257083000,0],[1775257387000,0],[1775257707000,0],[1775258027000,0.288],[1775258283000,0],[1775258603000,0],[1775258987000,0.240000012],[1775259179000,0.216],[1775259499000,0.72],[1775259947000,0],[1775260075000,0],[1775260411000,0.119999988],[1775260651000,0],[1775261004000,0],[1775261275000,0],[1775261580000,0],[1775261852000,0.135],[1775262203000,0.668571444],[1775262475000,0.09],[1775262779000,0],[1775263051000,0],[1775263403000,0.411428556],[1775263675000,0.27],[1775263979000,0.154285704],[1775264251000,0.54],[1775264604000,0.659999988],[1775264875000,0.411428556],[1775265180000,0.771428556],[1775265451000,1.131428556],[1775265803000,1.320000012],[1775266075000,0.09],[1775266380000,0],[1775266651000,0],[1775267003000,0.565714296],[1775267276000,0.205714296],[1775267579000,0.565714296],[1775267852000,0.060000012],[1775268203000,0],[1775268507000,0],[1775268779000,0],[1775269099000,0],[1775269611000,0],[1775269675000,0],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1775253659000,2.52],[1775253915000,1.680000012],[1775254107000,2.52],[1775254427000,3.528],[1775254683000,2.016],[1775255003000,1.26],[1775255339000,0],[1775255664000,0.839999988],[1775255851000,1.26],[1775256171000,0],[1775256540000,0],[1775256827000,0],[1775257083000,0],[1775257387000,0],[1775257707000,0],[1775258027000,0.504],[1775258283000,0],[1775258603000,0],[1775258987000,1.680000012],[1775259179000,1.512],[1775259499000,1.89],[1775259947000,0],[1775260075000,0],[1775260411000,0.839999988],[1775260651000,0],[1775261004000,0],[1775261275000,0],[1775261580000,0],[1775261852000,0.63],[1775262203000,1.44],[1775262475000,0.63],[1775262779000,0],[1775263051000,0],[1775263403000,1.44],[1775263675000,0.63],[1775263979000,0.72],[1775264251000,1.26],[1775264604000,1.680000012],[1775264875000,1.44],[1775265180000,1.8],[1775265451000,1.8],[1775265803000,2.52],[1775266075000,0.63],[1775266380000,0],[1775266651000,0],[1775267003000,1.8],[1775267276000,1.08],[1775267579000,1.08],[1775267852000,0.420000012],[1775268203000,0],[1775268507000,0],[1775268779000,0],[1775269099000,0],[1775269611000,0],[1775269675000,0],], 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: [[1775253659000,179.00000000],[1775253915000,333.00000000],[1775254107000,135.50000000],[1775254427000,244.80000000],[1775254683000,139.40000000],[1775255003000,160.50000000],[1775255339000,20.00000000],[1775255664000,238.66666667],[1775255851000,16.00000000],[1775256171000,99.50000000],[1775256540000,99.50000000],[1775256827000,39.75000000],[1775257083000,44.00000000],[1775257387000,99.80000000],[1775257707000,12.50000000],[1775258027000,77.80000000],[1775258283000,178.50000000],[1775258603000,130.66666667],[1775258987000,131.00000000],[1775259179000,68.80000000],[1775259499000,173.25000000],[1775259947000,24.00000000],[1775260075000,40.25000000],[1775260411000,78.16666667],[1775260651000,49.12500000],[1775261004000,31.57142857],[1775261275000,36.00000000],[1775261580000,36.00000000],[1775261852000,140.50000000],[1775262203000,187.00000000],[1775262475000,84.62500000],[1775262779000,21.14285714],[1775263051000,24.12500000],[1775263403000,294.14285714],[1775263675000,99.62500000],[1775263979000,113.71428571],[1775264251000,230.50000000],[1775264604000,261.83333333],[1775264875000,195.57142857],[1775265180000,168.28571429],[1775265451000,178.71428571],[1775265803000,206.50000000],[1775266075000,135.87500000],[1775266380000,50.00000000],[1775266651000,28.25000000],[1775267003000,180.42857143],[1775267276000,102.42857143],[1775267579000,218.14285714],[1775267852000,86.16666667],[1775268203000,23.50000000],[1775268507000,60.71428571],[1775268779000,95.00000000],[1775269099000,77.00000000],[1775269611000,44.00000000],[1775269675000,54.00000000],], 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); }); $(document).ready(function() { dataset = [ { label: 'Slnečné žiarenie (W/m2)', data: [[1775253659000,0.00000000],[1775253915000,0.00000000],[1775254107000,0.00000000],[1775254427000,0.00000000],[1775254683000,0.00000000],[1775255003000,0.00000000],[1775255339000,0.00000000],[1775255664000,0.00000000],[1775255851000,0.00000000],[1775256171000,0.00000000],[1775256540000,0.00000000],[1775256827000,0.00000000],[1775257083000,0.00000000],[1775257387000,0.00000000],[1775257707000,0.00000000],[1775258027000,0.00000000],[1775258283000,0.00000000],[1775258603000,0.00000000],[1775258987000,0.00000000],[1775259179000,0.00000000],[1775259499000,0.00000000],[1775259947000,0.00000000],[1775260075000,0.00000000],[1775260411000,0.00000000],[1775260651000,0.00000000],[1775261004000,0.00000000],[1775261275000,0.00000000],[1775261580000,0.00000000],[1775261852000,0.00000000],[1775262203000,0.00000000],[1775262475000,0.00000000],[1775262779000,0.00000000],[1775263051000,0.00000000],[1775263403000,0.00000000],[1775263675000,0.00000000],[1775263979000,0.00000000],[1775264251000,0.00000000],[1775264604000,0.00000000],[1775264875000,0.00000000],[1775265180000,0.00000000],[1775265451000,0.00000000],[1775265803000,0.00000000],[1775266075000,0.00000000],[1775266380000,0.00000000],[1775266651000,0.00000000],[1775267003000,0.00000000],[1775267276000,0.00000000],[1775267579000,0.00000000],[1775267852000,0.00000000],[1775268203000,0.00000000],[1775268507000,0.00000000],[1775268779000,0.00000000],[1775269099000,0.00000000],[1775269611000,0.00000000],[1775269675000,0.00000000],], color: '#ffb92f' } ]; var options = { xaxes: [{ axisLabel: 'solar_radiation', }], 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.1W/m2' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-solar-radiation-legend' } }; graphs['#chart-solar-radiation'] = $.plot('#chart-solar-radiation', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'UV žiarenie', data: [[1775253659000,0.00000000],[1775253915000,0.00000000],[1775254107000,0.00000000],[1775254427000,0.00000000],[1775254683000,0.00000000],[1775255003000,0.00000000],[1775255339000,0.00000000],[1775255664000,0.00000000],[1775255851000,0.00000000],[1775256171000,0.00000000],[1775256540000,0.00000000],[1775256827000,0.00000000],[1775257083000,0.00000000],[1775257387000,0.00000000],[1775257707000,0.00000000],[1775258027000,0.00000000],[1775258283000,0.00000000],[1775258603000,0.00000000],[1775258987000,0.00000000],[1775259179000,0.00000000],[1775259499000,0.00000000],[1775259947000,0.00000000],[1775260075000,0.00000000],[1775260411000,0.00000000],[1775260651000,0.00000000],[1775261004000,0.00000000],[1775261275000,0.00000000],[1775261580000,0.00000000],[1775261852000,0.00000000],[1775262203000,0.00000000],[1775262475000,0.00000000],[1775262779000,0.00000000],[1775263051000,0.00000000],[1775263403000,0.00000000],[1775263675000,0.00000000],[1775263979000,0.00000000],[1775264251000,0.00000000],[1775264604000,0.00000000],[1775264875000,0.00000000],[1775265180000,0.00000000],[1775265451000,0.00000000],[1775265803000,0.00000000],[1775266075000,0.00000000],[1775266380000,0.00000000],[1775266651000,0.00000000],[1775267003000,0.00000000],[1775267276000,0.00000000],[1775267579000,0.00000000],[1775267852000,0.00000000],[1775268203000,0.00000000],[1775268507000,0.00000000],[1775268779000,0.00000000],[1775269099000,0.00000000],[1775269611000,0.00000000],[1775269675000,0.00000000],], color: '#802674' } ]; var options = { xaxes: [{ axisLabel: 'uv', }], 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.0' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-uv-legend' } }; graphs['#chart-uv'] = $.plot('#chart-uv', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Zrážky', data: [[1775253659000,0.00000000],[1775253915000,0.00000000],[1775254107000,0.00000000],[1775254427000,0.00000000],[1775254683000,0.00000000],[1775255003000,0.00000000],[1775255339000,0.00000000],[1775255664000,0.00000000],[1775255851000,0.00000000],[1775256171000,0.00000000],[1775256540000,0.00000000],[1775256827000,0.00000000],[1775257083000,0.00000000],[1775257387000,0.00000000],[1775257707000,0.00000000],[1775258027000,0.00000000],[1775258283000,0.00000000],[1775258603000,0.00000000],[1775258987000,0.00000000],[1775259179000,0.00000000],[1775259499000,0.00000000],[1775259947000,0.00000000],[1775260075000,0.00000000],[1775260411000,0.00000000],[1775260651000,0.00000000],[1775261004000,0.00000000],[1775261275000,0.00000000],[1775261580000,0.00000000],[1775261852000,0.00000000],[1775262203000,0.00000000],[1775262475000,0.00000000],[1775262779000,0.00000000],[1775263051000,0.00000000],[1775263403000,0.00000000],[1775263675000,0.00000000],[1775263979000,0.00000000],[1775264251000,0.00000000],[1775264604000,0.00000000],[1775264875000,0.00000000],[1775265180000,0.00000000],[1775265451000,0.00000000],[1775265803000,0.00000000],[1775266075000,0.00000000],[1775266380000,0.00000000],[1775266651000,0.00000000],[1775267003000,0.00000000],[1775267276000,0.00000000],[1775267579000,0.00000000],[1775267852000,0.00000000],[1775268203000,0.00000000],[1775268507000,0.00000000],[1775268779000,0.00000000],[1775269099000,0.00000000],[1775269611000,0.00000000],[1775269675000,0.00000000],], 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; }