var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1764889232000,6.20000000],[1764889393000,6.20000000],[1764889653000,6.25000000],[1764890013000,6.30000000],[1764890253000,6.35000000],[1764890613000,6.40000000],[1764890858000,6.40000000],[1764891153000,6.40000000],[1764891514000,6.47500000],[1764891776000,6.40000000],[1764892064000,6.40000000],[1764892413000,6.40000000],[1764892685000,6.40000000],[1764892957000,6.40000000],[1764893280000,6.40000000],[1764893553000,6.40000000],[1764893871000,6.40000000],[1764894207000,6.40000000],[1764894464000,6.40000000],[1764894800000,6.40000000],[1764895053000,6.40000000],[1764895354000,6.40000000],[1764895681000,6.40000000],[1764895954000,6.40000000],[1764896254000,6.40000000],[1764896554000,6.40000000],[1764896914000,6.40000000],[1764897215000,6.40000000],[1764897454000,6.33333333],[1764897760000,6.40000000],[1764898114000,6.40000000],[1764898354000,6.40000000],[1764898960000,6.30000000],[1764899314000,6.30000000],[1764899554000,6.30000000],[1764902014000,6.40000000],[1764902255000,6.40000000],[1764902554000,6.40000000],[1764902854000,6.40000000],[1764903214000,6.40000000],[1764903514000,6.40000000],[1764903754000,6.40000000],[1764904192000,6.40000000],[1764904414000,6.40000000],[1764904655000,6.40000000],[1764905440000,6.40000000],[1764905553000,6.40000000],[1764905854000,6.40000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1764889232000,5.9],[1764889393000,5.9],[1764889653000,6],[1764890013000,6],[1764890253000,6.1],[1764890613000,6.1],[1764890858000,6.1],[1764891153000,6.1],[1764891514000,6.2],[1764891776000,6.1],[1764892064000,6.1],[1764892413000,6.1],[1764892685000,6.1],[1764892957000,6.1],[1764893280000,6.1],[1764893553000,6.1],[1764893871000,6.1],[1764894207000,6.1],[1764894464000,6.1],[1764894800000,6.1],[1764895053000,6.1],[1764895354000,6.1],[1764895681000,6.1],[1764895954000,6.1],[1764896254000,6.1],[1764896554000,6.1],[1764896914000,6.1],[1764897215000,6.1],[1764897454000,6],[1764897760000,6.1],[1764898114000,6.1],[1764898354000,6.1],[1764898960000,6],[1764899314000,6],[1764899554000,6],[1764902014000,6.1],[1764902255000,6.1],[1764902554000,6.1],[1764902854000,6.1],[1764903214000,6.1],[1764903514000,6.1],[1764903754000,6.1],[1764904192000,6.1],[1764904414000,6.1],[1764904655000,6.1],[1764905440000,6.1],[1764905553000,6.1],[1764905854000,6.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: [[1764889232000,98.00000000],[1764889393000,98.00000000],[1764889653000,98.00000000],[1764890013000,98.00000000],[1764890253000,98.00000000],[1764890613000,98.00000000],[1764890858000,98.00000000],[1764891153000,98.00000000],[1764891514000,98.00000000],[1764891776000,98.00000000],[1764892064000,98.00000000],[1764892413000,98.00000000],[1764892685000,98.00000000],[1764892957000,98.00000000],[1764893280000,98.00000000],[1764893553000,98.00000000],[1764893871000,98.00000000],[1764894207000,98.00000000],[1764894464000,98.00000000],[1764894800000,98.00000000],[1764895053000,98.00000000],[1764895354000,98.00000000],[1764895681000,98.00000000],[1764895954000,98.00000000],[1764896254000,98.00000000],[1764896554000,98.00000000],[1764896914000,98.00000000],[1764897215000,98.00000000],[1764897454000,98.00000000],[1764897760000,98.00000000],[1764898114000,98.00000000],[1764898354000,98.00000000],[1764898960000,98.00000000],[1764899314000,98.00000000],[1764899554000,98.00000000],[1764902014000,98.00000000],[1764902255000,98.00000000],[1764902554000,98.00000000],[1764902854000,98.00000000],[1764903214000,98.00000000],[1764903514000,98.00000000],[1764903754000,98.00000000],[1764904192000,98.00000000],[1764904414000,98.00000000],[1764904655000,98.00000000],[1764905440000,98.00000000],[1764905553000,98.00000000],[1764905854000,98.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: [[1764889232000,1008],[1764889393000,1008.3],[1764889653000,1008.2],[1764890013000,1008.1],[1764890253000,1008],[1764890613000,1008.1],[1764890858000,1008],[1764891153000,1008.1],[1764891514000,1007.8],[1764891776000,1007.9],[1764892064000,1007.8],[1764892413000,1007.7],[1764892685000,1007.8],[1764892957000,1007.8],[1764893280000,1007.9],[1764893553000,1007.7],[1764893871000,1007.7],[1764894207000,1007.7],[1764894464000,1007.7],[1764894800000,1007.6],[1764895053000,1007.6],[1764895354000,1007.7],[1764895681000,1007.6],[1764895954000,1007.5],[1764896254000,1007.5],[1764896554000,1007.5],[1764896914000,1007.5],[1764897454000,1007.4],[1764897760000,1007.4],[1764898114000,1007.5],[1764898354000,1007.4],[1764898960000,1007.6],[1764899314000,1007.4],[1764899554000,1007.4],[1764902255000,1007.2],[1764902554000,1007.1],[1764902854000,1007.2],[1764903214000,1007.1],[1764903514000,1007.1],[1764903754000,1007.2],[1764904414000,1007],[1764904655000,1007],[1764905553000,1007.1],[1764905854000,1007.1],], 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: [[1764889232000,0],[1764889393000,0.479999988],[1764889653000,0.36],[1764890013000,2.16],[1764890253000,0.81],[1764890613000,1.8],[1764890858000,3.51],[1764891153000,2.07],[1764891514000,1.8],[1764891776000,3.15],[1764892064000,0.99],[1764892413000,3.15],[1764892685000,3.24],[1764892957000,2.664],[1764893280000,2.7],[1764893553000,0.864],[1764893871000,1.152],[1764894207000,1.44],[1764894464000,1.656],[1764894800000,1.71],[1764895053000,1.71],[1764895354000,1.08],[1764895681000,2.040000012],[1764895954000,3.840000012],[1764896254000,2.61],[1764896554000,0.36],[1764896914000,0.36],[1764897215000,5.04],[1764897454000,5.04],[1764897760000,2.88],[1764898114000,2.88],[1764898354000,2.88],[1764898960000,1.44],[1764899314000,1.44],[1764899554000,1.44],[1764902014000,2.16],[1764902255000,2.760000012],[1764902554000,3.96],[1764902854000,3.96],[1764903214000,3.359999988],[1764903514000,3.6],[1764903754000,3.6],[1764904192000,3.6],[1764904414000,3.96],[1764904655000,3.96],[1764905440000,3.96],[1764905553000,3.96],[1764905854000,3.96],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1764889232000,0],[1764889393000,0.839999988],[1764889653000,0.63],[1764890013000,3.359999988],[1764890253000,3.15],[1764890613000,2.52],[1764890858000,7.02],[1764891153000,4.41],[1764891514000,3.78],[1764891776000,5.67],[1764892064000,1.89],[1764892413000,5.04],[1764892685000,6.3],[1764892957000,5.04],[1764893280000,5.04],[1764893553000,2.52],[1764893871000,2.016],[1764894207000,3.15],[1764894464000,3.528],[1764894800000,3.78],[1764895053000,3.15],[1764895354000,2.52],[1764895681000,4.200000012],[1764895954000,6.720000012],[1764896254000,4.41],[1764896554000,2.52],[1764896914000,2.52],[1764897215000,7.56],[1764897454000,7.56],[1764897760000,5.04],[1764898114000,5.04],[1764898354000,5.04],[1764898960000,2.52],[1764899314000,2.52],[1764899554000,2.52],[1764902014000,5.04],[1764902255000,5.879999988],[1764902554000,8.399999988],[1764902854000,5.04],[1764903214000,4.200000012],[1764903514000,5.04],[1764903754000,5.04],[1764904192000,5.04],[1764904414000,5.04],[1764904655000,5.04],[1764905440000,5.04],[1764905553000,5.04],[1764905854000,5.04],], 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: [[1764889232000,87.50000000],[1764889393000,78.33333333],[1764889653000,77.50000000],[1764890013000,77.66666667],[1764890253000,56.25000000],[1764890613000,73.50000000],[1764890858000,56.50000000],[1764891153000,58.50000000],[1764891514000,57.50000000],[1764891776000,83.75000000],[1764892064000,80.00000000],[1764892413000,54.75000000],[1764892685000,123.25000000],[1764892957000,46.60000000],[1764893280000,59.75000000],[1764893553000,81.80000000],[1764893871000,83.60000000],[1764894207000,68.75000000],[1764894464000,84.60000000],[1764894800000,137.25000000],[1764895053000,65.75000000],[1764895354000,83.75000000],[1764895681000,124.33333333],[1764895954000,36.33333333],[1764896254000,89.75000000],[1764896554000,96.00000000],[1764896914000,96.00000000],[1764897215000,48.00000000],[1764897454000,106.66666667],[1764897760000,67.00000000],[1764898114000,67.00000000],[1764898354000,67.00000000],[1764898960000,80.00000000],[1764899314000,80.00000000],[1764899554000,80.00000000],[1764902014000,4.00000000],[1764902255000,66.00000000],[1764902554000,41.66666667],[1764902854000,68.33333333],[1764903214000,67.00000000],[1764903514000,59.00000000],[1764903754000,59.00000000],[1764904192000,75.00000000],[1764904414000,8.00000000],[1764904655000,8.00000000],[1764905440000,85.00000000],[1764905553000,85.00000000],[1764905854000,85.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: [[1764889232000,0.00000000],[1764889393000,0.00000000],[1764889653000,0.00000000],[1764890013000,0.00000000],[1764890253000,0.00000000],[1764890613000,0.00000000],[1764890858000,0.00000000],[1764891153000,0.00000000],[1764891514000,0.00000000],[1764891776000,0.00000000],[1764892064000,0.00000000],[1764892413000,0.00000000],[1764892685000,0.00000000],[1764892957000,0.00000000],[1764893280000,0.00000000],[1764893553000,0.00000000],[1764893871000,0.00000000],[1764894207000,0.00000000],[1764894464000,0.00000000],[1764894800000,0.00000000],[1764895053000,0.00000000],[1764895354000,0.00000000],[1764895681000,0.00000000],[1764895954000,0.00000000],[1764896254000,0.00000000],[1764896554000,0.00000000],[1764896914000,0.00000000],[1764897215000,0.00000000],[1764897454000,0.00000000],[1764897760000,0.00000000],[1764898114000,0.00000000],[1764898354000,0.00000000],[1764898960000,0.00000000],[1764899314000,0.00000000],[1764899554000,0.00000000],[1764902014000,0.00000000],[1764902255000,0.00000000],[1764902554000,0.00000000],[1764902854000,0.00000000],[1764903214000,0.00000000],[1764903514000,0.00000000],[1764903754000,0.00000000],[1764904192000,0.00000000],[1764904414000,0.00000000],[1764904655000,0.00000000],[1764905440000,0.00000000],[1764905553000,0.00000000],[1764905854000,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: [[1764889232000,0.00000000],[1764889393000,0.00000000],[1764889653000,0.00000000],[1764890013000,0.00000000],[1764890253000,0.00000000],[1764890613000,0.00000000],[1764890858000,0.00000000],[1764891153000,0.00000000],[1764891514000,0.00000000],[1764891776000,0.00000000],[1764892064000,0.00000000],[1764892413000,0.00000000],[1764892685000,0.00000000],[1764892957000,0.00000000],[1764893280000,0.00000000],[1764893553000,0.00000000],[1764893871000,0.00000000],[1764894207000,0.00000000],[1764894464000,0.00000000],[1764894800000,0.00000000],[1764895053000,0.00000000],[1764895354000,0.00000000],[1764895681000,0.00000000],[1764895954000,0.00000000],[1764896254000,0.00000000],[1764896554000,0.00000000],[1764896914000,0.00000000],[1764897215000,0.00000000],[1764897454000,0.00000000],[1764897760000,0.00000000],[1764898114000,0.00000000],[1764898354000,0.00000000],[1764898960000,0.00000000],[1764899314000,0.00000000],[1764899554000,0.00000000],[1764902014000,0.00000000],[1764902255000,0.00000000],[1764902554000,0.00000000],[1764902854000,0.00000000],[1764903214000,0.00000000],[1764903514000,0.00000000],[1764903754000,0.00000000],[1764904192000,0.00000000],[1764904414000,0.00000000],[1764904655000,0.00000000],[1764905440000,0.00000000],[1764905553000,0.00000000],[1764905854000,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: [[1764889232000,0.00000000],[1764889393000,0.00000000],[1764889653000,0.15225000],[1764890013000,0.40633333],[1764890253000,0.60950000],[1764890613000,0.85100000],[1764890858000,1.09250000],[1764891153000,1.27025000],[1764891514000,1.70200000],[1764891776000,2.00700000],[1764892064000,2.27975000],[1764892413000,2.53975000],[1764892685000,2.69200000],[1764892957000,2.99700000],[1764893280000,3.30200000],[1764893553000,3.42380000],[1764893871000,3.62700000],[1764894207000,3.85450000],[1764894464000,3.98800000],[1764894800000,4.29300000],[1764895053000,4.44525000],[1764895354000,4.57225000],[1764895681000,4.80100000],[1764895954000,4.93633333],[1764896254000,5.08025000],[1764896554000,5.30900000],[1764896914000,5.30900000],[1764897215000,5.79100000],[1764897454000,5.99433333],[1764897760000,6.09600000],[1764898114000,6.09600000],[1764898354000,6.09600000],[1764898960000,6.80700000],[1764899314000,6.80700000],[1764899554000,6.80700000],[1764902014000,8.30600000],[1764902255000,8.61100000],[1764902554000,8.67000000],[1764902854000,8.78800000],[1764903214000,8.78800000],[1764903514000,8.78800000],[1764903754000,8.78800000],[1764904192000,9.09300000],[1764904414000,9.09300000],[1764904655000,9.09300000],[1764905440000,9.09300000],[1764905553000,9.09300000],[1764905854000,9.09300000],], 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; }