var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1784671977000,13.06666667],[1784672312000,12.93333333],[1784672612000,12.90000000],[1784672852000,12.90000000],[1784673993000,13.20000000],[1784674057000,13.26000000],[1784674377000,13.25000000],[1784674652000,13.30000000],[1784675012000,13.40000000],[1784675256000,13.50000000],[1784675555000,13.50000000],[1784675897000,13.56666667],[1784676169000,13.66666667],[1784676454000,13.77500000],[1784676761000,13.80000000],[1784677081000,13.80000000],[1784677352000,13.80000000],[1784677652000,13.80000000],[1784678013000,14.05000000],[1784678253000,14.97500000],[1784678612000,15.52500000],[1784678912000,15.93333333],[1784679212000,16.13333333],[1784679513000,16.46666667],[1784679813000,16.56666667],[1784680057000,16.70000000],[1784680413000,16.80000000],[1784680713000,16.80000000],[1784680953000,16.80000000],[1784681313000,16.80000000],[1784681553000,16.80000000],[1784681856000,16.80000000],[1784682153000,16.70000000],[1784682453000,16.70000000],[1784682813000,16.70000000],[1784683481000,16.30000000],[1784683673000,16.30000000],[1784683953000,16.20000000],[1784684312000,16.20000000],[1784684552000,16.00000000],[1784684912000,16.00000000],[1784685592000,15.50000000],[1784685812000,15.50000000],[1784686052000,15.50000000],[1784686533000,14.70000000],[1784686653000,14.50000000],[1784687013000,14.00000000],[1784687313000,13.66666667],[1784687613000,13.43333333],[1784687853000,13.30000000],[1784688153000,13.30000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1784671977000,8.5],[1784672312000,8.5],[1784672612000,8.5],[1784672852000,8.5],[1784673993000,8.8],[1784674057000,8.9],[1784674377000,8.9],[1784674652000,8.9],[1784675012000,8.9],[1784675256000,8.9],[1784675555000,8.9],[1784675897000,9],[1784676169000,9.1],[1784676454000,9],[1784676761000,9],[1784677081000,8.9],[1784677352000,8.8],[1784677652000,8.8],[1784678013000,8.8],[1784678253000,9],[1784678612000,9.1],[1784678912000,9.2],[1784679212000,9.1],[1784679513000,9.1],[1784679813000,9.2],[1784680057000,9.1],[1784680413000,9.4],[1784680713000,9.4],[1784680953000,9.4],[1784681313000,9.4],[1784681553000,9.4],[1784681856000,9.4],[1784682153000,9.3],[1784682453000,9.3],[1784682813000,9.3],[1784683481000,9.4],[1784683673000,9.4],[1784683953000,9.3],[1784684312000,9.3],[1784684552000,9.4],[1784684912000,9.4],[1784685592000,9.1],[1784685812000,9.1],[1784686052000,9.1],[1784686533000,9],[1784686653000,9],[1784687013000,9],[1784687313000,8.8],[1784687613000,8.8],[1784687853000,8.7],[1784688153000,8.7],], 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: [[1784671977000,74.00000000],[1784672312000,74.66666667],[1784672612000,75.00000000],[1784672852000,75.00000000],[1784673993000,75.00000000],[1784674057000,75.00000000],[1784674377000,75.00000000],[1784674652000,75.00000000],[1784675012000,74.25000000],[1784675256000,74.00000000],[1784675555000,74.00000000],[1784675897000,74.00000000],[1784676169000,74.00000000],[1784676454000,73.00000000],[1784676761000,73.00000000],[1784677081000,72.50000000],[1784677352000,72.00000000],[1784677652000,72.00000000],[1784678013000,71.00000000],[1784678253000,67.50000000],[1784678612000,66.00000000],[1784678912000,64.33333333],[1784679212000,63.33333333],[1784679513000,62.00000000],[1784679813000,62.00000000],[1784680057000,61.00000000],[1784680413000,62.00000000],[1784680713000,62.00000000],[1784680953000,62.00000000],[1784681313000,62.00000000],[1784681553000,62.00000000],[1784681856000,62.00000000],[1784682153000,62.00000000],[1784682453000,62.00000000],[1784682813000,62.00000000],[1784683481000,64.00000000],[1784683673000,64.00000000],[1784683953000,64.00000000],[1784684312000,64.00000000],[1784684552000,65.00000000],[1784684912000,65.00000000],[1784685592000,66.00000000],[1784685812000,66.00000000],[1784686052000,66.00000000],[1784686533000,69.00000000],[1784686653000,70.00000000],[1784687013000,72.00000000],[1784687313000,72.66666667],[1784687613000,73.66666667],[1784687853000,74.00000000],[1784688153000,74.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: [[1784671977000,1019],[1784672312000,1019.1],[1784672612000,1019.3],[1784672852000,1019.2],[1784674057000,1019.2],[1784674377000,1019.3],[1784674652000,1019.2],[1784675012000,1019.3],[1784675256000,1019.2],[1784675555000,1019.1],[1784675897000,1019.1],[1784676169000,1019.1],[1784676454000,1019.1],[1784676761000,1019.1],[1784677081000,1019],[1784677352000,1018.9],[1784677652000,1018.8],[1784678013000,1018.9],[1784678253000,1018.8],[1784678612000,1018.8],[1784678912000,1018.8],[1784679212000,1018.7],[1784679513000,1018.6],[1784679813000,1018.8],[1784680057000,1018.6],[1784680413000,1018.5],[1784680713000,1018.5],[1784680953000,1018.5],[1784681313000,1018.6],[1784681553000,1018.6],[1784681856000,1018.6],[1784682153000,1018.5],[1784682453000,1018.6],[1784682813000,1018.4],[1784683673000,1018.4],[1784683953000,1018.3],[1784684312000,1018.3],[1784684552000,1018.4],[1784684912000,1018.3],[1784685812000,1018.2],[1784686052000,1018.4],[1784686653000,1018.3],[1784687013000,1018.4],[1784687313000,1018.4],[1784687613000,1018.5],[1784687853000,1018.6],[1784688153000,1018.5],], 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: [[1784671977000,0],[1784672312000,0],[1784672612000,0],[1784672852000,0],[1784673993000,0],[1784674057000,0],[1784674377000,0],[1784674652000,0],[1784675012000,0],[1784675256000,0],[1784675555000,0],[1784675897000,0],[1784676169000,0],[1784676454000,0],[1784676761000,0],[1784677081000,0],[1784677352000,0],[1784677652000,0],[1784678013000,0],[1784678253000,1.44],[1784678612000,0.72],[1784678912000,0],[1784679212000,0],[1784679513000,0],[1784679813000,0.960000012],[1784680057000,0],[1784680413000,0],[1784680713000,0.479999988],[1784680953000,0],[1784681313000,0],[1784681553000,0.119999988],[1784681856000,0],[1784682153000,2.639999988],[1784682453000,0],[1784682813000,0],[1784683481000,0],[1784683673000,0],[1784683953000,0],[1784684312000,0],[1784684552000,0],[1784684912000,0],[1784685592000,0],[1784685812000,0],[1784686052000,0],[1784686533000,0],[1784686653000,0],[1784687013000,0],[1784687313000,0],[1784687613000,0],[1784687853000,0],[1784688153000,0],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1784671977000,0],[1784672312000,0],[1784672612000,0],[1784672852000,0],[1784673993000,0],[1784674057000,0],[1784674377000,0],[1784674652000,0],[1784675012000,0],[1784675256000,0],[1784675555000,0],[1784675897000,0],[1784676169000,0],[1784676454000,0],[1784676761000,0],[1784677081000,0],[1784677352000,0],[1784677652000,0],[1784678013000,0],[1784678253000,3.78],[1784678612000,2.52],[1784678912000,0],[1784679212000,0],[1784679513000,0],[1784679813000,2.52],[1784680057000,0],[1784680413000,0],[1784680713000,0.839999988],[1784680953000,0],[1784681313000,0],[1784681553000,0.839999988],[1784681856000,0],[1784682153000,6.720000012],[1784682453000,0],[1784682813000,0],[1784683481000,0],[1784683673000,0],[1784683953000,0],[1784684312000,0],[1784684552000,0],[1784684912000,0],[1784685592000,0],[1784685812000,0],[1784686052000,0],[1784686533000,0],[1784686653000,0],[1784687013000,0],[1784687313000,0],[1784687613000,0],[1784687853000,0],[1784688153000,0],], 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: [[1784671977000,101.00000000],[1784672312000,96.33333333],[1784672612000,95.00000000],[1784672852000,95.00000000],[1784673993000,101.00000000],[1784674057000,102.80000000],[1784674377000,102.25000000],[1784674652000,109.00000000],[1784675012000,106.25000000],[1784675256000,100.00000000],[1784675555000,103.75000000],[1784675897000,111.66666667],[1784676169000,116.33333333],[1784676454000,100.50000000],[1784676761000,94.50000000],[1784677081000,103.75000000],[1784677352000,101.33333333],[1784677652000,104.00000000],[1784678013000,101.50000000],[1784678253000,76.50000000],[1784678612000,103.75000000],[1784678912000,102.66666667],[1784679212000,98.66666667],[1784679513000,103.66666667],[1784679813000,100.00000000],[1784680057000,99.00000000],[1784680413000,108.33333333],[1784680713000,66.33333333],[1784680953000,74.00000000],[1784681313000,106.00000000],[1784681553000,107.66666667],[1784681856000,103.00000000],[1784682153000,240.66666667],[1784682453000,104.00000000],[1784682813000,104.00000000],[1784683481000,97.00000000],[1784683673000,99.00000000],[1784683953000,95.00000000],[1784684312000,99.00000000],[1784684552000,101.00000000],[1784684912000,101.00000000],[1784685592000,99.00000000],[1784685812000,99.00000000],[1784686052000,99.00000000],[1784686533000,98.00000000],[1784686653000,99.00000000],[1784687013000,108.00000000],[1784687313000,100.66666667],[1784687613000,103.00000000],[1784687853000,103.00000000],[1784688153000,102.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: [[1784671977000,0.00000000],[1784672312000,0.00000000],[1784672612000,0.00000000],[1784672852000,0.00000000],[1784673993000,0.00000000],[1784674057000,0.00000000],[1784674377000,0.00000000],[1784674652000,0.00000000],[1784675012000,0.00000000],[1784675256000,0.00000000],[1784675555000,0.00000000],[1784675897000,0.00000000],[1784676169000,0.00000000],[1784676454000,0.00000000],[1784676761000,0.00000000],[1784677081000,0.00000000],[1784677352000,0.00000000],[1784677652000,0.00000000],[1784678013000,0.00000000],[1784678253000,0.00000000],[1784678612000,0.00000000],[1784678912000,0.00000000],[1784679212000,0.00000000],[1784679513000,0.00000000],[1784679813000,0.00000000],[1784680057000,0.00000000],[1784680413000,0.00000000],[1784680713000,0.00000000],[1784680953000,0.00000000],[1784681313000,0.00000000],[1784681553000,0.00000000],[1784681856000,0.00000000],[1784682153000,0.00000000],[1784682453000,0.00000000],[1784682813000,0.00000000],[1784683481000,0.00000000],[1784683673000,0.00000000],[1784683953000,0.00000000],[1784684312000,0.00000000],[1784684552000,0.00000000],[1784684912000,0.00000000],[1784685592000,0.00000000],[1784685812000,0.00000000],[1784686052000,0.00000000],[1784686533000,0.00000000],[1784686653000,0.00000000],[1784687013000,0.00000000],[1784687313000,0.00000000],[1784687613000,0.00000000],[1784687853000,0.00000000],[1784688153000,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: [[1784671977000,0.00000000],[1784672312000,0.00000000],[1784672612000,0.00000000],[1784672852000,0.00000000],[1784673993000,0.00000000],[1784674057000,0.00000000],[1784674377000,0.00000000],[1784674652000,0.00000000],[1784675012000,0.00000000],[1784675256000,0.00000000],[1784675555000,0.00000000],[1784675897000,0.00000000],[1784676169000,0.00000000],[1784676454000,0.00000000],[1784676761000,0.00000000],[1784677081000,0.00000000],[1784677352000,0.00000000],[1784677652000,0.00000000],[1784678013000,0.00000000],[1784678253000,0.00000000],[1784678612000,0.00000000],[1784678912000,0.00000000],[1784679212000,0.00000000],[1784679513000,0.00000000],[1784679813000,0.00000000],[1784680057000,0.00000000],[1784680413000,0.00000000],[1784680713000,0.00000000],[1784680953000,0.00000000],[1784681313000,0.00000000],[1784681553000,0.00000000],[1784681856000,0.00000000],[1784682153000,0.00000000],[1784682453000,0.00000000],[1784682813000,0.00000000],[1784683481000,0.00000000],[1784683673000,0.00000000],[1784683953000,0.00000000],[1784684312000,0.00000000],[1784684552000,0.00000000],[1784684912000,0.00000000],[1784685592000,0.00000000],[1784685812000,0.00000000],[1784686052000,0.00000000],[1784686533000,0.00000000],[1784686653000,0.00000000],[1784687013000,0.00000000],[1784687313000,0.00000000],[1784687613000,0.00000000],[1784687853000,0.00000000],[1784688153000,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: [[1784671977000,0.00000000],[1784672312000,0.00000000],[1784672612000,0.00000000],[1784672852000,0.00000000],[1784673993000,0.00000000],[1784674057000,0.00000000],[1784674377000,0.00000000],[1784674652000,0.00000000],[1784675012000,0.00000000],[1784675256000,0.00000000],[1784675555000,0.00000000],[1784675897000,0.00000000],[1784676169000,0.00000000],[1784676454000,0.00000000],[1784676761000,0.00000000],[1784677081000,0.00000000],[1784677352000,0.00000000],[1784677652000,0.00000000],[1784678013000,0.00000000],[1784678253000,0.00000000],[1784678612000,0.00000000],[1784678912000,0.00000000],[1784679212000,0.00000000],[1784679513000,0.00000000],[1784679813000,0.00000000],[1784680057000,0.00000000],[1784680413000,0.00000000],[1784680713000,0.00000000],[1784680953000,0.00000000],[1784681313000,0.00000000],[1784681553000,0.00000000],[1784681856000,0.00000000],[1784682153000,0.00000000],[1784682453000,0.00000000],[1784682813000,0.00000000],[1784683481000,0.00000000],[1784683673000,0.00000000],[1784683953000,0.00000000],[1784684312000,0.00000000],[1784684552000,0.00000000],[1784684912000,0.00000000],[1784685592000,0.00000000],[1784685812000,0.00000000],[1784686052000,0.00000000],[1784686533000,0.00000000],[1784686653000,0.00000000],[1784687013000,0.00000000],[1784687313000,0.00000000],[1784687613000,0.00000000],[1784687853000,0.00000000],[1784688153000,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; }