var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1785103258000,16.50000000],[1785103378000,16.58000000],[1785103677000,16.86000000],[1785103977000,17.00000000],[1785104277000,17.06000000],[1785104577000,17.26000000],[1785104877000,17.36000000],[1785105177000,17.52000000],[1785105477000,17.66000000],[1785105777000,17.68000000],[1785106077000,17.74000000],[1785106377000,17.88000000],[1785106676000,18.08000000],[1785106976000,18.18000000],[1785107277000,18.32000000],[1785107577000,18.96000000],[1785107877000,19.32000000],[1785108176000,19.40000000],[1785108477000,19.66000000],[1785108777000,19.44000000],[1785109077000,19.38000000],[1785109377000,19.38000000],[1785109676000,19.46000000],[1785109976000,19.34000000],[1785110276000,19.00000000],[1785110576000,18.78000000],[1785110877000,18.60000000],[1785111177000,18.50000000],[1785111477000,18.42000000],[1785111777000,18.28000000],[1785112077000,18.26000000],[1785112377000,18.10000000],[1785112677000,18.06000000],[1785112976000,18.06000000],[1785113276000,17.94000000],[1785113576000,17.74000000],[1785113875000,17.52000000],[1785114176000,17.28000000],[1785114476000,17.26000000],[1785114777000,17.40000000],[1785115077000,17.48000000],[1785115377000,17.46000000],[1785115676000,17.26000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1785103258000,12.7],[1785103378000,12.9],[1785103677000,13],[1785103977000,13],[1785104277000,13],[1785104577000,13.2],[1785104877000,13.3],[1785105177000,13.3],[1785105477000,13.4],[1785105777000,13.5],[1785106077000,13.5],[1785106377000,13.6],[1785106676000,13.8],[1785106976000,13.9],[1785107277000,13.7],[1785107577000,13.6],[1785107877000,13.6],[1785108176000,13.6],[1785108477000,13.8],[1785108777000,13.9],[1785109077000,13.7],[1785109377000,13.7],[1785109676000,13.7],[1785109976000,13.7],[1785110276000,13.8],[1785110576000,13.8],[1785110877000,13.6],[1785111177000,13.7],[1785111477000,13.8],[1785111777000,13.7],[1785112077000,13.7],[1785112377000,13.7],[1785112677000,13.4],[1785112976000,13.3],[1785113276000,13.4],[1785113576000,13.4],[1785113875000,13.4],[1785114176000,13.4],[1785114476000,13.4],[1785114777000,13.5],[1785115077000,13.4],[1785115377000,13.4],[1785115676000,13.5],], 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: [[1785103258000,78.50000000],[1785103378000,78.80000000],[1785103677000,78.00000000],[1785103977000,77.40000000],[1785104277000,77.40000000],[1785104577000,77.00000000],[1785104877000,77.00000000],[1785105177000,76.20000000],[1785105477000,76.40000000],[1785105777000,76.80000000],[1785106077000,76.60000000],[1785106377000,76.00000000],[1785106676000,76.00000000],[1785106976000,76.00000000],[1785107277000,74.80000000],[1785107577000,71.00000000],[1785107877000,69.80000000],[1785108176000,69.20000000],[1785108477000,69.00000000],[1785108777000,70.40000000],[1785109077000,70.00000000],[1785109377000,69.80000000],[1785109676000,69.40000000],[1785109976000,70.00000000],[1785110276000,72.00000000],[1785110576000,73.00000000],[1785110877000,72.80000000],[1785111177000,73.80000000],[1785111477000,74.40000000],[1785111777000,74.80000000],[1785112077000,74.80000000],[1785112377000,75.40000000],[1785112677000,74.40000000],[1785112976000,74.00000000],[1785113276000,74.80000000],[1785113576000,76.00000000],[1785113875000,77.00000000],[1785114176000,78.00000000],[1785114476000,78.40000000],[1785114777000,78.00000000],[1785115077000,77.20000000],[1785115377000,77.20000000],[1785115676000,78.80000000],], 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: [[1785103258000,1005.3],[1785103378000,1005.2],[1785103677000,1005],[1785103977000,1005.1],[1785104277000,1005.2],[1785104577000,1005.2],[1785104877000,1005.1],[1785105177000,1005.1],[1785105477000,1005.1],[1785105777000,1005.1],[1785106077000,1005.2],[1785106377000,1005.1],[1785106676000,1005],[1785106976000,1005],[1785107277000,1005.1],[1785107577000,1004.9],[1785107877000,1004.9],[1785108176000,1004.9],[1785108477000,1004.9],[1785108777000,1004.9],[1785109077000,1004.8],[1785109377000,1004.9],[1785109676000,1004.8],[1785109976000,1004.7],[1785110276000,1004.7],[1785110576000,1004.6],[1785110877000,1004.5],[1785111177000,1004.6],[1785111477000,1004.6],[1785111777000,1004.6],[1785112077000,1004.5],[1785112377000,1004.6],[1785112677000,1004.7],[1785112976000,1004.6],[1785113276000,1004.6],[1785113576000,1004.4],[1785113875000,1004.4],[1785114176000,1004.4],[1785114476000,1004.5],[1785114777000,1004.6],[1785115077000,1004.5],[1785115377000,1004.6],[1785115676000,1004.7],], 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: [[1785103258000,0],[1785103378000,0.072],[1785103677000,0.864],[1785103977000,0.216],[1785104277000,0.072],[1785104577000,0.504],[1785104877000,1.008],[1785105177000,0.72],[1785105477000,0.648],[1785105777000,1.584],[1785106077000,1.224],[1785106377000,0.216],[1785106676000,0.216],[1785106976000,0.288],[1785107277000,1.728],[1785107577000,0.792],[1785107877000,0.36],[1785108176000,1.368],[1785108477000,0.288],[1785108777000,0.936],[1785109077000,0.144],[1785109377000,1.008],[1785109676000,0.792],[1785109976000,0.792],[1785110276000,0],[1785110576000,0.36],[1785110877000,0.432],[1785111177000,0.504],[1785111477000,0],[1785111777000,0],[1785112077000,0],[1785112377000,0.288],[1785112677000,2.52],[1785112976000,0.936],[1785113276000,1.44],[1785113576000,0.504],[1785113875000,0.216],[1785114176000,0.576],[1785114476000,0.936],[1785114777000,1.008],[1785115077000,1.296],[1785115377000,0],[1785115676000,0.792],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1785103258000,0],[1785103378000,0.504],[1785103677000,2.016],[1785103977000,2.016],[1785104277000,1.512],[1785104577000,1.008],[1785104877000,2.52],[1785105177000,2.016],[1785105477000,2.52],[1785105777000,3.024],[1785106077000,2.016],[1785106377000,0.504],[1785106676000,1.512],[1785106976000,1.008],[1785107277000,3.024],[1785107577000,4.032],[1785107877000,2.52],[1785108176000,3.528],[1785108477000,1.512],[1785108777000,2.016],[1785109077000,2.016],[1785109377000,1.008],[1785109676000,2.52],[1785109976000,2.016],[1785110276000,0],[1785110576000,1.008],[1785110877000,1.008],[1785111177000,1.512],[1785111477000,0.504],[1785111777000,0],[1785112077000,0],[1785112377000,0.504],[1785112677000,4.536],[1785112976000,2.52],[1785113276000,2.52],[1785113576000,3.024],[1785113875000,1.008],[1785114176000,2.016],[1785114476000,2.016],[1785114777000,2.016],[1785115077000,3.528],[1785115377000,0.504],[1785115676000,2.016],], 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: [[1785103258000,7.00000000],[1785103378000,7.00000000],[1785103677000,7.00000000],[1785103977000,7.00000000],[1785104277000,7.00000000],[1785104577000,7.40000000],[1785104877000,4.80000000],[1785105177000,0.40000000],[1785105477000,1.00000000],[1785105777000,6.40000000],[1785106077000,287.60000000],[1785106377000,357.40000000],[1785106676000,74.80000000],[1785106976000,4.00000000],[1785107277000,7.40000000],[1785107577000,77.20000000],[1785107877000,143.60000000],[1785108176000,7.00000000],[1785108477000,11.00000000],[1785108777000,80.60000000],[1785109077000,8.00000000],[1785109377000,10.00000000],[1785109676000,10.00000000],[1785109976000,10.00000000],[1785110276000,9.00000000],[1785110576000,9.00000000],[1785110877000,9.20000000],[1785111177000,5.80000000],[1785111477000,4.00000000],[1785111777000,4.00000000],[1785112077000,4.00000000],[1785112377000,3.80000000],[1785112677000,283.20000000],[1785112976000,354.60000000],[1785113276000,214.60000000],[1785113576000,6.00000000],[1785113875000,5.60000000],[1785114176000,3.00000000],[1785114476000,216.00000000],[1785114777000,359.00000000],[1785115077000,355.40000000],[1785115377000,354.00000000],[1785115676000,355.80000000],], 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: [[1785103258000,0.00000000],[1785103378000,0.00000000],[1785103677000,0.00000000],[1785103977000,0.00000000],[1785104277000,0.00000000],[1785104577000,0.00000000],[1785104877000,0.00000000],[1785105177000,0.00000000],[1785105477000,0.00000000],[1785105777000,0.00000000],[1785106077000,0.00000000],[1785106377000,0.00000000],[1785106676000,0.00000000],[1785106976000,0.00000000],[1785107277000,0.00000000],[1785107577000,0.00000000],[1785107877000,0.00000000],[1785108176000,0.00000000],[1785108477000,0.00000000],[1785108777000,0.00000000],[1785109077000,0.00000000],[1785109377000,0.00000000],[1785109676000,0.00000000],[1785109976000,0.00000000],[1785110276000,0.00000000],[1785110576000,0.00000000],[1785110877000,0.00000000],[1785111177000,0.00000000],[1785111477000,0.00000000],[1785111777000,0.00000000],[1785112077000,0.00000000],[1785112377000,0.00000000],[1785112677000,0.00000000],[1785112976000,0.00000000],[1785113276000,0.00000000],[1785113576000,0.00000000],[1785113875000,0.00000000],[1785114176000,0.00000000],[1785114476000,0.00000000],[1785114777000,0.00000000],[1785115077000,0.00000000],[1785115377000,0.00000000],[1785115676000,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: [[1785103258000,0.00000000],[1785103378000,0.00000000],[1785103677000,0.00000000],[1785103977000,0.00000000],[1785104277000,0.00000000],[1785104577000,0.00000000],[1785104877000,0.00000000],[1785105177000,0.00000000],[1785105477000,0.00000000],[1785105777000,0.00000000],[1785106077000,0.00000000],[1785106377000,0.00000000],[1785106676000,0.00000000],[1785106976000,0.00000000],[1785107277000,0.00000000],[1785107577000,0.00000000],[1785107877000,0.00000000],[1785108176000,0.00000000],[1785108477000,0.00000000],[1785108777000,0.00000000],[1785109077000,0.00000000],[1785109377000,0.00000000],[1785109676000,0.00000000],[1785109976000,0.00000000],[1785110276000,0.00000000],[1785110576000,0.00000000],[1785110877000,0.00000000],[1785111177000,0.00000000],[1785111477000,0.00000000],[1785111777000,0.00000000],[1785112077000,0.00000000],[1785112377000,0.00000000],[1785112677000,0.00000000],[1785112976000,0.00000000],[1785113276000,0.00000000],[1785113576000,0.00000000],[1785113875000,0.00000000],[1785114176000,0.00000000],[1785114476000,0.00000000],[1785114777000,0.00000000],[1785115077000,0.00000000],[1785115377000,0.00000000],[1785115676000,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: [[1785103258000,0.00000000],[1785103378000,0.00000000],[1785103677000,0.00000000],[1785103977000,0.00000000],[1785104277000,0.00000000],[1785104577000,0.00000000],[1785104877000,0.00000000],[1785105177000,0.00000000],[1785105477000,0.00000000],[1785105777000,0.00000000],[1785106077000,0.00000000],[1785106377000,0.00000000],[1785106676000,0.00000000],[1785106976000,0.00000000],[1785107277000,0.00000000],[1785107577000,0.00000000],[1785107877000,0.00000000],[1785108176000,0.00000000],[1785108477000,0.00000000],[1785108777000,0.00000000],[1785109077000,0.00000000],[1785109377000,0.00000000],[1785109676000,0.00000000],[1785109976000,0.00000000],[1785110276000,0.00000000],[1785110576000,0.00000000],[1785110877000,0.00000000],[1785111177000,0.00000000],[1785111477000,0.00000000],[1785111777000,0.00000000],[1785112077000,0.00000000],[1785112377000,0.00000000],[1785112677000,0.00000000],[1785112976000,0.00000000],[1785113276000,0.00000000],[1785113576000,0.00000000],[1785113875000,0.00000000],[1785114176000,0.00000000],[1785114476000,0.00000000],[1785114777000,0.00000000],[1785115077000,0.00000000],[1785115377000,0.00000000],[1785115676000,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; }