var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1755154768000,25.90000000],[1755155268000,26.56250000],[1755155988000,27.50000000],[1755156227000,27.60000000],[1755156710000,28.20000000],[1755156772000,28.74285714],[1755157428000,28.21428571],[1755157651000,28.55000000],[1755158140000,29.20000000],[1755158291000,29.30000000],[1755158869000,29.45000000],[1755159588000,29.93333333],[1755159779000,29.80000000],[1755160300000,29.60000000],[1755160403000,29.61666667],[1755161028000,29.81428571],[1755161251000,29.80000000],[1755161748000,30.12500000],[1755161877000,29.95000000],[1755162468000,30.23333333],[1755163188000,30.90000000],[1755163380000,31.10000000],[1755163908000,30.85000000],[1755163975000,30.88333333],[1755164628000,31.20000000],[1755164851000,31.10000000],[1755165348000,31.50000000],[1755165452000,31.50000000],[1755166068000,31.60000000],[1755166789000,31.90000000],[1755166979000,31.60000000],[1755167500000,31.60000000],[1755167747000,32.00000000],[1755168228000,31.70000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1755154768000,13],[1755155268000,12.5],[1755155988000,12.9],[1755156227000,12.8],[1755156710000,12.9],[1755156772000,12.9],[1755157428000,13.2],[1755157651000,12.9],[1755158140000,13.2],[1755158291000,12.7],[1755158869000,12.4],[1755159588000,12.4],[1755159779000,12.4],[1755160300000,12.1],[1755160403000,12],[1755161028000,12.6],[1755161251000,12.1],[1755161748000,12.7],[1755161877000,12.4],[1755162468000,12.5],[1755163188000,11.7],[1755163380000,11.2],[1755163908000,11.3],[1755163975000,11.3],[1755164628000,12.8],[1755164851000,12.5],[1755165348000,13.3],[1755165452000,12.6],[1755166068000,12.5],[1755166789000,12.4],[1755166979000,12.1],[1755167500000,12],[1755167747000,12.6],[1755168228000,12.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: [[1755154768000,45.00000000],[1755155268000,41.62500000],[1755155988000,40.50000000],[1755156227000,40.00000000],[1755156710000,39.00000000],[1755156772000,37.71428571],[1755157428000,39.71428571],[1755157651000,38.00000000],[1755158140000,37.50000000],[1755158291000,36.00000000],[1755158869000,35.00000000],[1755159588000,34.00000000],[1755159779000,34.33333333],[1755160300000,34.00000000],[1755160403000,33.66666667],[1755161028000,34.57142857],[1755161251000,33.50000000],[1755161748000,34.25000000],[1755161877000,34.00000000],[1755162468000,33.66666667],[1755163188000,30.66666667],[1755163380000,29.33333333],[1755163908000,30.00000000],[1755163975000,29.83333333],[1755164628000,32.42857143],[1755164851000,32.00000000],[1755165348000,33.00000000],[1755165452000,31.50000000],[1755166068000,31.00000000],[1755166789000,30.40000000],[1755166979000,30.33333333],[1755167500000,30.00000000],[1755167747000,30.50000000],[1755168228000,31.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: [[1755154768000,1019.8],[1755155268000,1019.6],[1755155988000,1019.7],[1755156227000,1019.6],[1755156710000,1019.4],[1755156772000,1019.4],[1755157428000,1019.3],[1755157651000,1019.4],[1755158140000,1019.2],[1755158291000,1019.2],[1755158869000,1019.2],[1755159588000,1019.1],[1755159779000,1019.1],[1755160300000,1019],[1755160403000,1019.1],[1755161028000,1019.1],[1755161251000,1019],[1755161748000,1018.8],[1755161877000,1019.1],[1755162468000,1018.8],[1755163188000,1018.7],[1755163380000,1018.9],[1755163908000,1018.7],[1755163975000,1018.8],[1755164628000,1018.8],[1755164851000,1018.8],[1755165348000,1018.6],[1755165452000,1018.6],[1755166068000,1018.5],[1755166789000,1018.5],[1755166979000,1018.5],[1755167500000,1018.6],[1755167747000,1018.4],[1755168228000,1018.3],], 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: [[1755154768000,2.88],[1755155268000,1.485],[1755155988000,0.9],[1755156227000,2.16],[1755156710000,0],[1755156772000,1.131428556],[1755157428000,0.411428556],[1755157651000,1.08],[1755158140000,0],[1755158291000,3.480000012],[1755158869000,0.765],[1755159588000,3.120000012],[1755159779000,1.320000012],[1755160300000,2.52],[1755160403000,2.7],[1755161028000,2.262857148],[1755161251000,3.96],[1755161748000,3.42],[1755161877000,5.49],[1755162468000,2.239999992],[1755163188000,1.739999988],[1755163380000,1.199999988],[1755163908000,1.08],[1755163975000,3.359999988],[1755164628000,3.24],[1755164851000,1.44],[1755165348000,3.24],[1755165452000,1.98],[1755166068000,3.840000012],[1755166789000,3.024],[1755166979000,4.560000012],[1755167500000,0],[1755167747000,6.3],[1755168228000,0.36],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1755154768000,5.04],[1755155268000,3.15],[1755155988000,2.52],[1755156227000,2.52],[1755156710000,0],[1755156772000,1.8],[1755157428000,0.72],[1755157651000,1.26],[1755158140000,0],[1755158291000,5.879999988],[1755158869000,1.89],[1755159588000,4.200000012],[1755159779000,2.52],[1755160300000,2.52],[1755160403000,4.200000012],[1755161028000,3.6],[1755161251000,5.04],[1755161748000,4.41],[1755161877000,8.19],[1755162468000,2.800000008],[1755163188000,3.359999988],[1755163380000,1.680000012],[1755163908000,2.52],[1755163975000,5.04],[1755164628000,4.68],[1755164851000,2.52],[1755165348000,4.200000012],[1755165452000,3.78],[1755166068000,6.720000012],[1755166789000,4.032],[1755166979000,6.720000012],[1755167500000,0],[1755167747000,7.56],[1755168228000,2.52],], 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: [[1755154768000,177.50000000],[1755155268000,187.37500000],[1755155988000,24.50000000],[1755156227000,60.00000000],[1755156710000,301.00000000],[1755156772000,222.14285714],[1755157428000,297.71428571],[1755157651000,313.00000000],[1755158140000,308.00000000],[1755158291000,185.00000000],[1755158869000,321.00000000],[1755159588000,260.66666667],[1755159779000,290.00000000],[1755160300000,44.00000000],[1755160403000,201.33333333],[1755161028000,211.85714286],[1755161251000,39.50000000],[1755161748000,280.75000000],[1755161877000,223.00000000],[1755162468000,156.11111111],[1755163188000,191.16666667],[1755163380000,314.33333333],[1755163908000,206.00000000],[1755163975000,261.83333333],[1755164628000,186.57142857],[1755164851000,271.50000000],[1755165348000,320.00000000],[1755165452000,170.00000000],[1755166068000,251.00000000],[1755166789000,132.00000000],[1755166979000,224.33333333],[1755167500000,303.00000000],[1755167747000,59.50000000],[1755168228000,282.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: [[1755154768000,76.00000000],[1755155268000,406.62500000],[1755155988000,352.50000000],[1755156227000,330.00000000],[1755156710000,448.00000000],[1755156772000,437.28571429],[1755157428000,493.14285714],[1755157651000,500.00000000],[1755158140000,519.00000000],[1755158291000,525.33333333],[1755158869000,547.00000000],[1755159588000,566.50000000],[1755159779000,570.00000000],[1755160300000,585.00000000],[1755160403000,587.16666667],[1755161028000,601.57142857],[1755161251000,605.00000000],[1755161748000,618.00000000],[1755161877000,620.50000000],[1755162468000,634.33333333],[1755163188000,644.33333333],[1755163380000,645.33333333],[1755163908000,655.00000000],[1755163975000,657.83333333],[1755164628000,665.00000000],[1755164851000,667.00000000],[1755165348000,399.33333333],[1755165452000,604.50000000],[1755166068000,672.66666667],[1755166789000,677.40000000],[1755166979000,678.33333333],[1755167500000,678.00000000],[1755167747000,679.50000000],[1755168228000,677.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: [[1755154768000,0.00000000],[1755155268000,3.50000000],[1755155988000,3.00000000],[1755156227000,3.00000000],[1755156710000,4.00000000],[1755156772000,3.71428571],[1755157428000,4.00000000],[1755157651000,4.00000000],[1755158140000,5.00000000],[1755158291000,5.00000000],[1755158869000,5.00000000],[1755159588000,5.00000000],[1755159779000,5.00000000],[1755160300000,5.00000000],[1755160403000,5.00000000],[1755161028000,5.00000000],[1755161251000,5.00000000],[1755161748000,6.00000000],[1755161877000,6.00000000],[1755162468000,6.00000000],[1755163188000,6.00000000],[1755163380000,6.00000000],[1755163908000,6.00000000],[1755163975000,6.00000000],[1755164628000,6.00000000],[1755164851000,6.00000000],[1755165348000,3.33333333],[1755165452000,5.50000000],[1755166068000,6.00000000],[1755166789000,6.00000000],[1755166979000,6.00000000],[1755167500000,6.00000000],[1755167747000,6.00000000],[1755168228000,6.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: [[1755154768000,0.00000000],[1755155268000,0.00000000],[1755155988000,0.00000000],[1755156227000,0.00000000],[1755156710000,0.00000000],[1755156772000,0.00000000],[1755157428000,0.00000000],[1755157651000,0.00000000],[1755158140000,0.00000000],[1755158291000,0.00000000],[1755158869000,0.00000000],[1755159588000,0.00000000],[1755159779000,0.00000000],[1755160300000,0.00000000],[1755160403000,0.00000000],[1755161028000,0.00000000],[1755161251000,0.00000000],[1755161748000,0.00000000],[1755161877000,0.00000000],[1755162468000,0.00000000],[1755163188000,0.00000000],[1755163380000,0.00000000],[1755163908000,0.00000000],[1755163975000,0.00000000],[1755164628000,0.00000000],[1755164851000,0.00000000],[1755165348000,0.00000000],[1755165452000,0.00000000],[1755166068000,0.00000000],[1755166789000,0.00000000],[1755166979000,0.00000000],[1755167500000,0.00000000],[1755167747000,0.00000000],[1755168228000,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; }