var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1773702051000,2.45000000],[1773702243000,2.32500000],[1773702499000,2.40000000],[1773702754000,2.45000000],[1773703251000,2.40000000],[1773703379000,2.38333333],[1773703699000,2.40000000],[1773703956000,2.35000000],[1773704275000,2.26250000],[1773704579000,2.12857143],[1773704851000,2.17500000],[1773705154000,2.38571429],[1773705475000,2.38750000],[1773705779000,2.45714286],[1773706051000,2.35000000],[1773706403000,2.28571429],[1773706675000,2.20000000],[1773706979000,2.20000000],[1773707251000,2.10000000],[1773707603000,2.02857143],[1773707875000,1.81250000],[1773708179000,1.92857143],[1773708451000,2.17500000],[1773708804000,2.00000000],[1773709075000,1.90000000],[1773709380000,1.82857143],[1773709651000,1.65000000],[1773710003000,1.45000000],[1773710291000,1.45000000],[1773710643000,1.64000000],[1773710883000,1.64000000],[1773711203000,1.60000000],[1773711507000,1.60000000],[1773711811000,1.52000000],[1773712083000,1.56666667],[1773712371000,1.06666667],[1773712677000,1.10000000],[1773712979000,1.32857143],[1773713252000,1.52500000],[1773713603000,1.60000000],[1773713875000,1.60000000],[1773714524000,1.28000000],[1773714803000,1.20000000],[1773715075000,1.16250000],[1773715379000,1.10000000],[1773715651000,1.27142857],[1773716003000,1.47142857],[1773716275000,1.60000000],[1773716579000,1.72857143],[1773716851000,1.70000000],[1773717203000,1.38571429],[1773717475000,1.30000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1773702051000,-0],[1773702243000,-0.1],[1773702499000,-0.1],[1773702754000,-0],[1773703251000,0],[1773703379000,0.1],[1773703699000,0.1],[1773703956000,0.1],[1773704275000,-0],[1773704579000,-0.1],[1773704851000,0],[1773705154000,0.1],[1773705475000,0.2],[1773705779000,0.2],[1773706051000,0.1],[1773706403000,0.2],[1773706675000,0.1],[1773706979000,0.1],[1773707251000,0.1],[1773707603000,0.1],[1773707875000,-0.1],[1773708179000,0.1],[1773708451000,0.2],[1773708804000,0],[1773709075000,0],[1773709380000,0],[1773709651000,-0.1],[1773710003000,-0.2],[1773710291000,-0.2],[1773710643000,-0],[1773710883000,-0],[1773711203000,-0],[1773711507000,-0],[1773711811000,-0.1],[1773712083000,-0.1],[1773712371000,-0.4],[1773712677000,-0.2],[1773712979000,0],[1773713252000,0.2],[1773713603000,0.1],[1773713875000,0.2],[1773714524000,-0.2],[1773714803000,-0.1],[1773715075000,-0.2],[1773715379000,-0.2],[1773715651000,0.1],[1773716003000,0.1],[1773716275000,0.3],[1773716579000,0.4],[1773716851000,0.3],[1773717203000,0],[1773717475000,-0],], 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: [[1773702051000,84.00000000],[1773702243000,84.25000000],[1773702499000,84.00000000],[1773702754000,84.00000000],[1773703251000,84.66666667],[1773703379000,85.00000000],[1773703699000,85.00000000],[1773703956000,85.00000000],[1773704275000,85.00000000],[1773704579000,85.42857143],[1773704851000,86.00000000],[1773705154000,85.14285714],[1773705475000,85.75000000],[1773705779000,85.42857143],[1773706051000,85.50000000],[1773706403000,86.00000000],[1773706675000,86.00000000],[1773706979000,86.00000000],[1773707251000,87.00000000],[1773707603000,87.00000000],[1773707875000,87.50000000],[1773708179000,88.00000000],[1773708451000,87.00000000],[1773708804000,87.00000000],[1773709075000,87.50000000],[1773709380000,88.00000000],[1773709651000,88.00000000],[1773710003000,89.00000000],[1773710291000,89.00000000],[1773710643000,89.00000000],[1773710883000,89.00000000],[1773711203000,89.00000000],[1773711507000,89.00000000],[1773711811000,89.00000000],[1773712083000,89.00000000],[1773712371000,89.83333333],[1773712677000,91.00000000],[1773712979000,91.00000000],[1773713252000,91.00000000],[1773713603000,90.14285714],[1773713875000,90.33333333],[1773714524000,90.00000000],[1773714803000,91.00000000],[1773715075000,91.00000000],[1773715379000,91.14285714],[1773715651000,91.85714286],[1773716003000,91.00000000],[1773716275000,91.00000000],[1773716579000,90.85714286],[1773716851000,90.25000000],[1773717203000,90.71428571],[1773717475000,91.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: [[1773702051000,1019.8],[1773702243000,1019.9],[1773702499000,1019.8],[1773702754000,1019.6],[1773703251000,1019.8],[1773703379000,1019.8],[1773703699000,1019.8],[1773703956000,1019.8],[1773704275000,1020],[1773704579000,1019.9],[1773704851000,1020],[1773705154000,1019.9],[1773705475000,1019.9],[1773705779000,1019.9],[1773706051000,1019.8],[1773706403000,1019.9],[1773706675000,1019.9],[1773706979000,1019.9],[1773707251000,1019.9],[1773707603000,1019.9],[1773707875000,1020.1],[1773708179000,1020],[1773708451000,1019.9],[1773708804000,1019.9],[1773709075000,1019.9],[1773709380000,1020],[1773709651000,1020],[1773710003000,1020],[1773710291000,1020.2],[1773710643000,1019.9],[1773710883000,1019.9],[1773711203000,1020.1],[1773711507000,1020],[1773711811000,1020],[1773712083000,1019.9],[1773712371000,1019.9],[1773712677000,1019.9],[1773712979000,1019.9],[1773713252000,1019.9],[1773713603000,1020],[1773713875000,1020],[1773714524000,1020.1],[1773714803000,1020],[1773715075000,1020.2],[1773715379000,1020.2],[1773715651000,1020.2],[1773716003000,1020],[1773716275000,1020],[1773716579000,1020],[1773716851000,1020],[1773717203000,1020.2],[1773717475000,1020],], 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: [[1773702051000,0],[1773702243000,0.09],[1773702499000,0],[1773702754000,0],[1773703251000,0],[1773703379000,0],[1773703699000,0],[1773703956000,0],[1773704275000,0],[1773704579000,0],[1773704851000,0],[1773705154000,0],[1773705475000,0],[1773705779000,0],[1773706051000,0],[1773706403000,0],[1773706675000,0],[1773706979000,0],[1773707251000,0],[1773707603000,0],[1773707875000,0],[1773708179000,0],[1773708451000,0],[1773708804000,0],[1773709075000,0],[1773709380000,0],[1773709651000,0],[1773710003000,0],[1773710291000,0],[1773710643000,0],[1773710883000,0],[1773711203000,0],[1773711507000,0],[1773711811000,0.936],[1773712083000,1.199999988],[1773712371000,0.479999988],[1773712677000,0.154285704],[1773712979000,0.051428556],[1773713252000,0.09],[1773713603000,0],[1773713875000,0],[1773714524000,0.072],[1773714803000,1.542857148],[1773715075000,0.315],[1773715379000,0],[1773715651000,0],[1773716003000,0],[1773716275000,0],[1773716579000,0],[1773716851000,0.27],[1773717203000,2.931428556],[1773717475000,4.5],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1773702051000,0],[1773702243000,0.63],[1773702499000,0],[1773702754000,0],[1773703251000,0],[1773703379000,0],[1773703699000,0],[1773703956000,0],[1773704275000,0],[1773704579000,0],[1773704851000,0],[1773705154000,0],[1773705475000,0],[1773705779000,0],[1773706051000,0],[1773706403000,0],[1773706675000,0],[1773706979000,0],[1773707251000,0],[1773707603000,0],[1773707875000,0],[1773708179000,0],[1773708451000,0],[1773708804000,0],[1773709075000,0],[1773709380000,0],[1773709651000,0],[1773710003000,0],[1773710291000,0],[1773710643000,0],[1773710883000,0],[1773711203000,0],[1773711507000,0],[1773711811000,1.512],[1773712083000,1.680000012],[1773712371000,1.26],[1773712677000,0.72],[1773712979000,0.36],[1773713252000,0.315],[1773713603000,0],[1773713875000,0],[1773714524000,0.504],[1773714803000,2.16],[1773715075000,0.63],[1773715379000,0],[1773715651000,0],[1773716003000,0],[1773716275000,0],[1773716579000,0],[1773716851000,0.63],[1773717203000,3.6],[1773717475000,6.3],], 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: [[1773702051000,305.00000000],[1773702243000,302.00000000],[1773702499000,327.50000000],[1773702754000,333.00000000],[1773703251000,309.66666667],[1773703379000,305.16666667],[1773703699000,307.80000000],[1773703956000,310.75000000],[1773704275000,316.62500000],[1773704579000,323.57142857],[1773704851000,334.37500000],[1773705154000,322.57142857],[1773705475000,319.62500000],[1773705779000,325.42857143],[1773706051000,308.37500000],[1773706403000,301.85714286],[1773706675000,308.87500000],[1773706979000,315.00000000],[1773707251000,315.00000000],[1773707603000,315.00000000],[1773707875000,314.87500000],[1773708179000,314.00000000],[1773708451000,324.62500000],[1773708804000,324.85714286],[1773709075000,325.12500000],[1773709380000,321.00000000],[1773709651000,321.00000000],[1773710003000,321.00000000],[1773710291000,334.25000000],[1773710643000,327.00000000],[1773710883000,326.00000000],[1773711203000,326.00000000],[1773711507000,318.00000000],[1773711811000,304.40000000],[1773712083000,128.00000000],[1773712371000,283.33333333],[1773712677000,285.85714286],[1773712979000,313.71428571],[1773713252000,286.00000000],[1773713603000,328.00000000],[1773713875000,327.00000000],[1773714524000,306.20000000],[1773714803000,293.14285714],[1773715075000,307.37500000],[1773715379000,307.57142857],[1773715651000,308.85714286],[1773716003000,311.71428571],[1773716275000,318.62500000],[1773716579000,322.28571429],[1773716851000,300.87500000],[1773717203000,259.42857143],[1773717475000,243.50000000],], 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: [[1773702051000,0.00000000],[1773702243000,0.00000000],[1773702499000,0.00000000],[1773702754000,0.00000000],[1773703251000,0.00000000],[1773703379000,0.00000000],[1773703699000,0.00000000],[1773703956000,0.00000000],[1773704275000,0.00000000],[1773704579000,0.00000000],[1773704851000,0.00000000],[1773705154000,0.00000000],[1773705475000,0.00000000],[1773705779000,0.00000000],[1773706051000,0.00000000],[1773706403000,0.00000000],[1773706675000,0.00000000],[1773706979000,0.00000000],[1773707251000,0.00000000],[1773707603000,0.00000000],[1773707875000,0.00000000],[1773708179000,0.00000000],[1773708451000,0.00000000],[1773708804000,0.00000000],[1773709075000,0.00000000],[1773709380000,0.00000000],[1773709651000,0.00000000],[1773710003000,0.00000000],[1773710291000,0.00000000],[1773710643000,0.00000000],[1773710883000,0.00000000],[1773711203000,0.00000000],[1773711507000,0.00000000],[1773711811000,0.00000000],[1773712083000,0.00000000],[1773712371000,0.00000000],[1773712677000,0.00000000],[1773712979000,0.00000000],[1773713252000,0.00000000],[1773713603000,0.00000000],[1773713875000,0.00000000],[1773714524000,0.00000000],[1773714803000,0.00000000],[1773715075000,0.00000000],[1773715379000,0.00000000],[1773715651000,0.00000000],[1773716003000,0.00000000],[1773716275000,0.00000000],[1773716579000,0.00000000],[1773716851000,0.00000000],[1773717203000,0.00000000],[1773717475000,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: [[1773702051000,0.00000000],[1773702243000,0.00000000],[1773702499000,0.00000000],[1773702754000,0.00000000],[1773703251000,0.00000000],[1773703379000,0.00000000],[1773703699000,0.00000000],[1773703956000,0.00000000],[1773704275000,0.00000000],[1773704579000,0.00000000],[1773704851000,0.00000000],[1773705154000,0.00000000],[1773705475000,0.00000000],[1773705779000,0.00000000],[1773706051000,0.00000000],[1773706403000,0.00000000],[1773706675000,0.00000000],[1773706979000,0.00000000],[1773707251000,0.00000000],[1773707603000,0.00000000],[1773707875000,0.00000000],[1773708179000,0.00000000],[1773708451000,0.00000000],[1773708804000,0.00000000],[1773709075000,0.00000000],[1773709380000,0.00000000],[1773709651000,0.00000000],[1773710003000,0.00000000],[1773710291000,0.00000000],[1773710643000,0.00000000],[1773710883000,0.00000000],[1773711203000,0.00000000],[1773711507000,0.00000000],[1773711811000,0.00000000],[1773712083000,0.00000000],[1773712371000,0.00000000],[1773712677000,0.00000000],[1773712979000,0.00000000],[1773713252000,0.00000000],[1773713603000,0.00000000],[1773713875000,0.00000000],[1773714524000,0.00000000],[1773714803000,0.00000000],[1773715075000,0.00000000],[1773715379000,0.00000000],[1773715651000,0.00000000],[1773716003000,0.00000000],[1773716275000,0.00000000],[1773716579000,0.00000000],[1773716851000,0.00000000],[1773717203000,0.00000000],[1773717475000,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: [[1773702051000,0.00000000],[1773702243000,0.00000000],[1773702499000,0.00000000],[1773702754000,0.00000000],[1773703251000,0.00000000],[1773703379000,0.00000000],[1773703699000,0.00000000],[1773703956000,0.00000000],[1773704275000,0.00000000],[1773704579000,0.00000000],[1773704851000,0.00000000],[1773705154000,0.00000000],[1773705475000,0.00000000],[1773705779000,0.00000000],[1773706051000,0.00000000],[1773706403000,0.00000000],[1773706675000,0.00000000],[1773706979000,0.00000000],[1773707251000,0.00000000],[1773707603000,0.00000000],[1773707875000,0.00000000],[1773708179000,0.00000000],[1773708451000,0.00000000],[1773708804000,0.00000000],[1773709075000,0.00000000],[1773709380000,0.00000000],[1773709651000,0.00000000],[1773710003000,0.00000000],[1773710291000,0.00000000],[1773710643000,0.00000000],[1773710883000,0.00000000],[1773711203000,0.00000000],[1773711507000,0.00000000],[1773711811000,0.00000000],[1773712083000,0.00000000],[1773712371000,0.00000000],[1773712677000,0.00000000],[1773712979000,0.00000000],[1773713252000,0.00000000],[1773713603000,0.00000000],[1773713875000,0.00000000],[1773714524000,0.00000000],[1773714803000,0.00000000],[1773715075000,0.00000000],[1773715379000,0.00000000],[1773715651000,0.00000000],[1773716003000,0.00000000],[1773716275000,0.00000000],[1773716579000,0.00000000],[1773716851000,0.00000000],[1773717203000,0.00000000],[1773717475000,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; }