var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1766530844000,2.80000000],[1766531012000,2.80000000],[1766531296000,2.80000000],[1766531612000,2.80000000],[1766531854000,2.80000000],[1766532212000,2.80000000],[1766532456000,2.80000000],[1766532780000,2.80000000],[1766533066000,2.80000000],[1766533412000,2.80000000],[1766533712000,2.80000000],[1766533996000,2.80000000],[1766534252000,2.80000000],[1766534552000,2.80000000],[1766534852000,2.80000000],[1766535164000,2.80000000],[1766535513000,2.80000000],[1766535769000,2.80000000],[1766536092000,2.80000000],[1766536413000,2.80000000],[1766536668000,2.80000000],[1766536953000,2.80000000],[1766537292000,2.80000000],[1766537554000,2.70000000],[1766537900000,2.70000000],[1766538154000,2.62000000],[1766538513000,2.60000000],[1766538753000,2.60000000],[1766539053000,2.60000000],[1766539414000,2.60000000],[1766540253000,2.40000000],[1766540613000,2.40000000],[1766541916000,2.20000000],[1766542114000,2.20000000],[1766542354000,2.20000000],[1766544574000,1.90000000],[1766544754000,1.90000000],[1766548714000,1.70000000],[1766549013000,1.70000000],[1766549313000,1.70000000],[1766549553000,1.70000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1766530844000,2.5],[1766531012000,2.5],[1766531296000,2.5],[1766531612000,2.4],[1766531854000,2.4],[1766532212000,2.4],[1766532456000,2.4],[1766532780000,2.4],[1766533066000,2.4],[1766533412000,2.4],[1766533712000,2.4],[1766533996000,2.4],[1766534252000,2.4],[1766534552000,2.4],[1766534852000,2.4],[1766535164000,2.4],[1766535513000,2.4],[1766535769000,2.4],[1766536092000,2.4],[1766536413000,2.4],[1766536668000,2.4],[1766536953000,2.4],[1766537292000,2.4],[1766537554000,2.3],[1766537900000,2.3],[1766538154000,2.2],[1766538513000,2.2],[1766538753000,2.2],[1766539053000,2.2],[1766539414000,2.2],[1766540253000,2],[1766540613000,2],[1766541916000,1.8],[1766542114000,1.8],[1766542354000,1.8],[1766544574000,1.5],[1766544754000,1.5],[1766548714000,1.1],[1766549013000,1.1],[1766549313000,1.1],[1766549553000,1.1],], 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: [[1766530844000,98.00000000],[1766531012000,98.00000000],[1766531296000,97.75000000],[1766531612000,97.33333333],[1766531854000,97.00000000],[1766532212000,97.00000000],[1766532456000,97.00000000],[1766532780000,97.00000000],[1766533066000,97.00000000],[1766533412000,97.00000000],[1766533712000,97.00000000],[1766533996000,97.00000000],[1766534252000,97.00000000],[1766534552000,97.00000000],[1766534852000,97.00000000],[1766535164000,97.00000000],[1766535513000,97.00000000],[1766535769000,97.00000000],[1766536092000,97.00000000],[1766536413000,97.00000000],[1766536668000,97.00000000],[1766536953000,97.00000000],[1766537292000,97.00000000],[1766537554000,97.00000000],[1766537900000,97.00000000],[1766538154000,97.00000000],[1766538513000,97.00000000],[1766538753000,97.00000000],[1766539053000,97.00000000],[1766539414000,97.00000000],[1766540253000,97.00000000],[1766540613000,97.00000000],[1766541916000,97.00000000],[1766542114000,97.00000000],[1766542354000,97.00000000],[1766544574000,97.00000000],[1766544754000,97.00000000],[1766548714000,96.00000000],[1766549013000,96.00000000],[1766549313000,96.00000000],[1766549553000,96.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: [[1766530844000,1019.1],[1766531012000,1019],[1766531296000,1019.1],[1766531612000,1019.2],[1766531854000,1019.1],[1766532212000,1019.2],[1766532456000,1019.2],[1766532780000,1019.2],[1766533066000,1019.2],[1766533412000,1019.2],[1766533712000,1019.2],[1766533996000,1019.1],[1766534252000,1019.2],[1766534552000,1019.2],[1766534852000,1019.2],[1766535164000,1019.2],[1766535513000,1019.2],[1766535769000,1019.1],[1766536092000,1019.3],[1766536413000,1019.2],[1766536668000,1019.2],[1766536953000,1019.1],[1766537292000,1019.2],[1766537554000,1019.3],[1766537900000,1019.4],[1766538154000,1019.4],[1766538513000,1019.5],[1766538753000,1019.5],[1766539053000,1019.6],[1766539414000,1019.6],[1766540253000,1019.6],[1766540613000,1019.5],[1766542114000,1019.4],[1766542354000,1019.5],[1766544754000,1019.5],[1766549013000,1019.5],[1766549313000,1019.4],[1766549553000,1019.4],], 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: [[1766530844000,1.44],[1766531012000,1.559999988],[1766531296000,0.09],[1766531612000,1.919999988],[1766531854000,1.26],[1766532212000,0.9],[1766532456000,0.792],[1766532780000,0.09],[1766533066000,1.71],[1766533412000,1.26],[1766533712000,0.36],[1766533996000,0.72],[1766534252000,0.36],[1766534552000,0.36],[1766534852000,1.296],[1766535164000,0.576],[1766535513000,0.36],[1766535769000,0.72],[1766536092000,1.368],[1766536413000,2.25],[1766536668000,1.44],[1766536953000,1.368],[1766537292000,1.53],[1766537554000,1.728],[1766537900000,3.6],[1766538154000,1.656],[1766538513000,3.719999988],[1766538753000,1.8],[1766539053000,0.36],[1766539414000,0.36],[1766540253000,3.96],[1766540613000,3.96],[1766541916000,1.44],[1766542114000,1.44],[1766542354000,1.44],[1766544574000,3.6],[1766544754000,3.6],[1766548714000,2.400000012],[1766549013000,0.119999988],[1766549313000,0.36],[1766549553000,0.36],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1766530844000,2.52],[1766531012000,3.359999988],[1766531296000,0.63],[1766531612000,3.359999988],[1766531854000,1.89],[1766532212000,1.89],[1766532456000,1.008],[1766532780000,0.63],[1766533066000,3.15],[1766533412000,3.15],[1766533712000,0.839999988],[1766533996000,1.26],[1766534252000,0.63],[1766534552000,0.63],[1766534852000,2.52],[1766535164000,1.512],[1766535513000,1.26],[1766535769000,1.512],[1766536092000,2.016],[1766536413000,3.15],[1766536668000,3.15],[1766536953000,2.52],[1766537292000,2.52],[1766537554000,3.528],[1766537900000,6.3],[1766538154000,3.024],[1766538513000,5.879999988],[1766538753000,3.359999988],[1766539053000,2.52],[1766539414000,2.52],[1766540253000,5.04],[1766540613000,5.04],[1766541916000,2.52],[1766542114000,2.52],[1766542354000,2.52],[1766544574000,5.04],[1766544754000,5.04],[1766548714000,3.359999988],[1766549013000,0.839999988],[1766549313000,2.52],[1766549553000,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: [[1766530844000,46.00000000],[1766531012000,165.33333333],[1766531296000,146.50000000],[1766531612000,72.00000000],[1766531854000,80.00000000],[1766532212000,64.75000000],[1766532456000,133.60000000],[1766532780000,119.00000000],[1766533066000,67.25000000],[1766533412000,58.00000000],[1766533712000,89.66666667],[1766533996000,75.00000000],[1766534252000,83.00000000],[1766534552000,83.75000000],[1766534852000,82.00000000],[1766535164000,76.60000000],[1766535513000,84.00000000],[1766535769000,73.60000000],[1766536092000,117.40000000],[1766536413000,74.75000000],[1766536668000,57.00000000],[1766536953000,81.60000000],[1766537292000,50.75000000],[1766537554000,84.40000000],[1766537900000,47.25000000],[1766538154000,128.00000000],[1766538513000,150.00000000],[1766538753000,59.00000000],[1766539053000,85.00000000],[1766539414000,85.00000000],[1766540253000,25.00000000],[1766540613000,25.00000000],[1766541916000,90.00000000],[1766542114000,90.00000000],[1766542354000,90.00000000],[1766544574000,76.00000000],[1766544754000,76.00000000],[1766548714000,71.66666667],[1766549013000,73.66666667],[1766549313000,83.00000000],[1766549553000,83.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: [[1766530844000,0.00000000],[1766531012000,0.00000000],[1766531296000,0.00000000],[1766531612000,0.00000000],[1766531854000,0.00000000],[1766532212000,0.00000000],[1766532456000,0.00000000],[1766532780000,0.00000000],[1766533066000,0.00000000],[1766533412000,0.00000000],[1766533712000,0.00000000],[1766533996000,0.00000000],[1766534252000,0.00000000],[1766534552000,0.00000000],[1766534852000,0.00000000],[1766535164000,0.00000000],[1766535513000,0.00000000],[1766535769000,0.00000000],[1766536092000,0.00000000],[1766536413000,0.00000000],[1766536668000,0.00000000],[1766536953000,0.00000000],[1766537292000,0.00000000],[1766537554000,0.00000000],[1766537900000,0.00000000],[1766538154000,0.00000000],[1766538513000,0.00000000],[1766538753000,0.00000000],[1766539053000,0.00000000],[1766539414000,0.00000000],[1766540253000,0.00000000],[1766540613000,0.00000000],[1766541916000,0.00000000],[1766542114000,0.00000000],[1766542354000,0.00000000],[1766544574000,0.00000000],[1766544754000,0.00000000],[1766548714000,0.00000000],[1766549013000,0.00000000],[1766549313000,0.00000000],[1766549553000,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: [[1766530844000,0.00000000],[1766531012000,0.00000000],[1766531296000,0.00000000],[1766531612000,0.00000000],[1766531854000,0.00000000],[1766532212000,0.00000000],[1766532456000,0.00000000],[1766532780000,0.00000000],[1766533066000,0.00000000],[1766533412000,0.00000000],[1766533712000,0.00000000],[1766533996000,0.00000000],[1766534252000,0.00000000],[1766534552000,0.00000000],[1766534852000,0.00000000],[1766535164000,0.00000000],[1766535513000,0.00000000],[1766535769000,0.00000000],[1766536092000,0.00000000],[1766536413000,0.00000000],[1766536668000,0.00000000],[1766536953000,0.00000000],[1766537292000,0.00000000],[1766537554000,0.00000000],[1766537900000,0.00000000],[1766538154000,0.00000000],[1766538513000,0.00000000],[1766538753000,0.00000000],[1766539053000,0.00000000],[1766539414000,0.00000000],[1766540253000,0.00000000],[1766540613000,0.00000000],[1766541916000,0.00000000],[1766542114000,0.00000000],[1766542354000,0.00000000],[1766544574000,0.00000000],[1766544754000,0.00000000],[1766548714000,0.00000000],[1766549013000,0.00000000],[1766549313000,0.00000000],[1766549553000,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: [[1766530844000,0.00000000],[1766531012000,0.00000000],[1766531296000,0.00000000],[1766531612000,0.00000000],[1766531854000,0.00000000],[1766532212000,0.00000000],[1766532456000,0.00000000],[1766532780000,0.00000000],[1766533066000,0.00000000],[1766533412000,0.00000000],[1766533712000,0.00000000],[1766533996000,0.00000000],[1766534252000,0.00000000],[1766534552000,0.00000000],[1766534852000,0.00000000],[1766535164000,0.20300000],[1766535513000,0.20300000],[1766535769000,0.20300000],[1766536092000,0.26400000],[1766536413000,0.50800000],[1766536668000,0.50800000],[1766536953000,0.67540000],[1766537292000,0.78700000],[1766537554000,0.78700000],[1766537900000,0.78700000],[1766538154000,0.86860000],[1766538513000,0.99100000],[1766538753000,0.99100000],[1766539053000,0.99100000],[1766539414000,0.99100000],[1766540253000,0.99100000],[1766540613000,0.99100000],[1766541916000,0.99100000],[1766542114000,0.99100000],[1766542354000,0.99100000],[1766544574000,1.29500000],[1766544754000,1.29500000],[1766548714000,1.29500000],[1766549013000,1.29500000],[1766549313000,1.29500000],[1766549553000,1.29500000],], 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; }