var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1769641264000,2.80000000],[1769641391000,2.80000000],[1769641711000,2.80000000],[1769641967000,2.80000000],[1769642287000,2.94000000],[1769642607000,3.00000000],[1769642879000,3.00000000],[1769643199000,3.00000000],[1769643454000,3.00000000],[1769643775000,3.00000000],[1769644095000,3.00000000],[1769644351000,2.96000000],[1769644671000,2.90000000],[1769644991000,2.94000000],[1769645311000,2.95000000],[1769645567000,2.98000000],[1769645887000,2.92000000],[1769646207000,2.90000000],[1769646463000,2.90000000],[1769646783000,2.90000000],[1769647113000,2.90000000],[1769647375000,2.96000000],[1769647695000,3.00000000],[1769647951000,3.10000000],[1769648271000,3.10000000],[1769648591000,3.18000000],[1769648911000,3.10000000],[1769649167000,3.18000000],[1769649487000,3.24000000],[1769649807000,3.20000000],[1769650063000,3.20000000],[1769650383000,3.20000000],[1769650703000,3.15000000],[1769650959000,3.12000000],[1769651279000,3.08000000],[1769651599000,3.02500000],[1769651853000,3.00000000],[1769652191000,3.00000000],[1769652511000,2.97500000],[1769652767000,2.90000000],[1769653087000,2.90000000],[1769653407000,2.87500000],[1769653663000,2.86000000],[1769653983000,2.94000000],[1769654303000,3.00000000],[1769654559000,3.00000000],[1769654896000,3.00000000],[1769655151000,3.06000000],[1769655471000,3.24000000],[1769655791000,3.36000000],[1769656111000,3.40000000],[1769656368000,3.46000000],[1769656687000,3.38000000],[1769657007000,3.42500000],[1769657263000,3.50000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1769641264000,2.4],[1769641391000,2.2],[1769641711000,2.2],[1769641967000,2.2],[1769642287000,2.3],[1769642607000,2.3],[1769642879000,2.3],[1769643199000,2.2],[1769643454000,2.2],[1769643775000,2.3],[1769644095000,2.3],[1769644351000,2.2],[1769644671000,2.3],[1769644991000,2.4],[1769645311000,2.4],[1769645567000,2.4],[1769645887000,2.3],[1769646207000,2.4],[1769646463000,2.5],[1769646783000,2.5],[1769647113000,2.5],[1769647375000,2.5],[1769647695000,2.5],[1769647951000,2.5],[1769648271000,2.5],[1769648591000,2.4],[1769648911000,2.4],[1769649167000,2.3],[1769649487000,2.4],[1769649807000,2.3],[1769650063000,2.3],[1769650383000,2.3],[1769650703000,2.3],[1769650959000,2.4],[1769651279000,2.3],[1769651599000,2.4],[1769651853000,2.4],[1769652191000,2.4],[1769652511000,2.4],[1769652767000,2.3],[1769653087000,2.4],[1769653407000,2.4],[1769653663000,2.4],[1769653983000,2.5],[1769654303000,2.6],[1769654559000,2.6],[1769654896000,2.6],[1769655151000,2.5],[1769655471000,2.7],[1769655791000,2.7],[1769656111000,2.7],[1769656368000,2.7],[1769656687000,2.8],[1769657007000,2.7],[1769657263000,2.8],], 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: [[1769641264000,97.00000000],[1769641391000,96.20000000],[1769641711000,96.00000000],[1769641967000,96.00000000],[1769642287000,95.40000000],[1769642607000,95.00000000],[1769642879000,95.00000000],[1769643199000,94.25000000],[1769643454000,94.80000000],[1769643775000,95.00000000],[1769644095000,95.00000000],[1769644351000,95.00000000],[1769644671000,95.80000000],[1769644991000,96.00000000],[1769645311000,96.00000000],[1769645567000,96.00000000],[1769645887000,96.00000000],[1769646207000,96.50000000],[1769646463000,97.00000000],[1769646783000,97.00000000],[1769647113000,97.00000000],[1769647375000,97.00000000],[1769647695000,96.75000000],[1769647951000,96.00000000],[1769648271000,96.00000000],[1769648591000,95.00000000],[1769648911000,95.00000000],[1769649167000,94.00000000],[1769649487000,94.00000000],[1769649807000,94.00000000],[1769650063000,94.00000000],[1769650383000,94.00000000],[1769650703000,94.00000000],[1769650959000,94.80000000],[1769651279000,95.00000000],[1769651599000,95.50000000],[1769651853000,96.00000000],[1769652191000,96.00000000],[1769652511000,96.00000000],[1769652767000,96.00000000],[1769653087000,96.80000000],[1769653407000,97.00000000],[1769653663000,97.00000000],[1769653983000,97.00000000],[1769654303000,97.00000000],[1769654559000,97.00000000],[1769654896000,97.00000000],[1769655151000,96.20000000],[1769655471000,96.00000000],[1769655791000,95.20000000],[1769656111000,95.00000000],[1769656368000,95.00000000],[1769656687000,95.80000000],[1769657007000,95.25000000],[1769657263000,95.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: [[1769641264000,1000.3],[1769641391000,1000.4],[1769641711000,1000.4],[1769641967000,1000.5],[1769642287000,1000.3],[1769642607000,1000.5],[1769642879000,1000.5],[1769643199000,1000.4],[1769643454000,1000.5],[1769643775000,1000.5],[1769644095000,1000.4],[1769644351000,1000.3],[1769644671000,1000.3],[1769644991000,1000.3],[1769645311000,1000.3],[1769645567000,1000.4],[1769645887000,1000.4],[1769646207000,1000.5],[1769646463000,1000.4],[1769646783000,1000.4],[1769647113000,1000.5],[1769647375000,1000.5],[1769647695000,1000.5],[1769647951000,1000.6],[1769648271000,1000.6],[1769648591000,1000.7],[1769648911000,1000.7],[1769649167000,1000.7],[1769649487000,1000.6],[1769649807000,1000.6],[1769650063000,1000.6],[1769650383000,1000.6],[1769650703000,1000.6],[1769650959000,1000.7],[1769651279000,1000.7],[1769651599000,1000.6],[1769651853000,1000.6],[1769652191000,1000.6],[1769652511000,1000.6],[1769652767000,1000.6],[1769653087000,1000.5],[1769653407000,1000.5],[1769653663000,1000.6],[1769653983000,1000.5],[1769654303000,1000.5],[1769654559000,1000.5],[1769654896000,1000.4],[1769655151000,1000.3],[1769655471000,1000.2],[1769655791000,1000.2],[1769656111000,1000.1],[1769656368000,1000.2],[1769656687000,1000.2],[1769657007000,1000.2],[1769657263000,1000.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: [[1769641264000,8.1],[1769641391000,8.64],[1769641711000,7.83],[1769641967000,8.712],[1769642287000,11.304],[1769642607000,8.1],[1769642879000,7.848],[1769643199000,6.93],[1769643454000,9.864],[1769643775000,10.296],[1769644095000,9.18],[1769644351000,12.384],[1769644671000,11.664],[1769644991000,12.816],[1769645311000,8.01],[1769645567000,7.488],[1769645887000,6.048],[1769646207000,7.38],[1769646463000,2.88],[1769646783000,4.68],[1769647113000,4.86],[1769647375000,4.392],[1769647695000,6.48],[1769647951000,6.12],[1769648271000,7.56],[1769648591000,4.968],[1769648911000,5.22],[1769649167000,6.408],[1769649487000,8.424],[1769649807000,6.48],[1769650063000,6.624],[1769650383000,5.688],[1769650703000,7.65],[1769650959000,6.912],[1769651279000,6.12],[1769651599000,4.23],[1769651853000,6.696],[1769652191000,6.696],[1769652511000,5.94],[1769652767000,4.68],[1769653087000,6.192],[1769653407000,2.79],[1769653663000,7.632],[1769653983000,6.336],[1769654303000,5.4],[1769654559000,7.2],[1769654896000,5.49],[1769655151000,9.576],[1769655471000,8.424],[1769655791000,10.512],[1769656111000,12.15],[1769656368000,5.904],[1769656687000,7.992],[1769657007000,10.35],[1769657263000,9],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1769641264000,11.52],[1769641391000,12.816],[1769641711000,11.52],[1769641967000,12.24],[1769642287000,15.984],[1769642607000,10.89],[1769642879000,10.656],[1769643199000,9.54],[1769643454000,11.808],[1769643775000,14.904],[1769644095000,12.78],[1769644351000,16.416],[1769644671000,17.496],[1769644991000,18],[1769645311000,13.5],[1769645567000,11.232],[1769645887000,8.568],[1769646207000,10.89],[1769646463000,4.032],[1769646783000,7.128],[1769647113000,6.3],[1769647375000,6.048],[1769647695000,9.63],[1769647951000,7.632],[1769648271000,10.728],[1769648591000,6.552],[1769648911000,7.65],[1769649167000,9.648],[1769649487000,11.232],[1769649807000,8.91],[1769650063000,9.144],[1769650383000,7.56],[1769650703000,10.26],[1769650959000,9.144],[1769651279000,7.56],[1769651599000,5.67],[1769651853000,9.72],[1769652191000,8.136],[1769652511000,8.91],[1769652767000,6.048],[1769653087000,8.136],[1769653407000,3.15],[1769653663000,11.232],[1769653983000,8.64],[1769654303000,6.93],[1769654559000,10.224],[1769654896000,7.56],[1769655151000,12.744],[1769655471000,10.728],[1769655791000,13.896],[1769656111000,16.11],[1769656368000,8.712],[1769656687000,10.656],[1769657007000,14.04],[1769657263000,12.96],], 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: [[1769641264000,36.50000000],[1769641391000,22.00000000],[1769641711000,47.00000000],[1769641967000,20.60000000],[1769642287000,83.00000000],[1769642607000,104.50000000],[1769642879000,18.00000000],[1769643199000,21.50000000],[1769643454000,219.00000000],[1769643775000,32.60000000],[1769644095000,30.50000000],[1769644351000,86.60000000],[1769644671000,18.60000000],[1769644991000,147.40000000],[1769645311000,107.00000000],[1769645567000,29.60000000],[1769645887000,165.00000000],[1769646207000,13.50000000],[1769646463000,32.20000000],[1769646783000,33.80000000],[1769647113000,52.50000000],[1769647375000,41.40000000],[1769647695000,45.75000000],[1769647951000,16.20000000],[1769648271000,59.00000000],[1769648591000,36.20000000],[1769648911000,40.25000000],[1769649167000,35.20000000],[1769649487000,111.60000000],[1769649807000,31.00000000],[1769650063000,36.60000000],[1769650383000,36.60000000],[1769650703000,31.75000000],[1769650959000,65.60000000],[1769651279000,30.80000000],[1769651599000,114.75000000],[1769651853000,156.00000000],[1769652191000,26.20000000],[1769652511000,23.00000000],[1769652767000,42.20000000],[1769653087000,21.80000000],[1769653407000,42.75000000],[1769653663000,34.40000000],[1769653983000,23.60000000],[1769654303000,41.75000000],[1769654559000,29.60000000],[1769654896000,30.00000000],[1769655151000,84.20000000],[1769655471000,18.60000000],[1769655791000,90.00000000],[1769656111000,186.25000000],[1769656368000,25.40000000],[1769656687000,74.60000000],[1769657007000,95.50000000],[1769657263000,355.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: [[1769641264000,0.00000000],[1769641391000,0.00000000],[1769641711000,0.00000000],[1769641967000,0.00000000],[1769642287000,0.00000000],[1769642607000,0.00000000],[1769642879000,0.00000000],[1769643199000,0.00000000],[1769643454000,0.00000000],[1769643775000,0.00000000],[1769644095000,0.00000000],[1769644351000,0.00000000],[1769644671000,0.00000000],[1769644991000,0.00000000],[1769645311000,0.00000000],[1769645567000,0.00000000],[1769645887000,0.00000000],[1769646207000,0.00000000],[1769646463000,0.00000000],[1769646783000,0.00000000],[1769647113000,0.00000000],[1769647375000,0.00000000],[1769647695000,0.00000000],[1769647951000,0.00000000],[1769648271000,0.00000000],[1769648591000,0.00000000],[1769648911000,0.00000000],[1769649167000,0.00000000],[1769649487000,0.00000000],[1769649807000,0.00000000],[1769650063000,0.00000000],[1769650383000,0.00000000],[1769650703000,0.00000000],[1769650959000,0.00000000],[1769651279000,0.00000000],[1769651599000,0.00000000],[1769651853000,0.00000000],[1769652191000,0.00000000],[1769652511000,0.00000000],[1769652767000,0.00000000],[1769653087000,0.00000000],[1769653407000,0.00000000],[1769653663000,0.00000000],[1769653983000,0.00000000],[1769654303000,0.00000000],[1769654559000,0.00000000],[1769654896000,0.00000000],[1769655151000,0.00000000],[1769655471000,0.00000000],[1769655791000,0.00000000],[1769656111000,0.00000000],[1769656368000,0.00000000],[1769656687000,0.00000000],[1769657007000,0.00000000],[1769657263000,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: [[1769641264000,0.00000000],[1769641391000,0.00000000],[1769641711000,0.00000000],[1769641967000,0.00000000],[1769642287000,0.00000000],[1769642607000,0.00000000],[1769642879000,0.00000000],[1769643199000,0.00000000],[1769643454000,0.00000000],[1769643775000,0.00000000],[1769644095000,0.00000000],[1769644351000,0.00000000],[1769644671000,0.00000000],[1769644991000,0.00000000],[1769645311000,0.00000000],[1769645567000,0.00000000],[1769645887000,0.00000000],[1769646207000,0.00000000],[1769646463000,0.00000000],[1769646783000,0.00000000],[1769647113000,0.00000000],[1769647375000,0.00000000],[1769647695000,0.00000000],[1769647951000,0.00000000],[1769648271000,0.00000000],[1769648591000,0.00000000],[1769648911000,0.00000000],[1769649167000,0.00000000],[1769649487000,0.00000000],[1769649807000,0.00000000],[1769650063000,0.00000000],[1769650383000,0.00000000],[1769650703000,0.00000000],[1769650959000,0.00000000],[1769651279000,0.00000000],[1769651599000,0.00000000],[1769651853000,0.00000000],[1769652191000,0.00000000],[1769652511000,0.00000000],[1769652767000,0.00000000],[1769653087000,0.00000000],[1769653407000,0.00000000],[1769653663000,0.00000000],[1769653983000,0.00000000],[1769654303000,0.00000000],[1769654559000,0.00000000],[1769654896000,0.00000000],[1769655151000,0.00000000],[1769655471000,0.00000000],[1769655791000,0.00000000],[1769656111000,0.00000000],[1769656368000,0.00000000],[1769656687000,0.00000000],[1769657007000,0.00000000],[1769657263000,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: [[1769641264000,0.00000000],[1769641391000,0.00000000],[1769641711000,0.00000000],[1769641967000,0.00000000],[1769642287000,0.00000000],[1769642607000,0.00000000],[1769642879000,0.00000000],[1769643199000,0.00000000],[1769643454000,0.00000000],[1769643775000,0.00000000],[1769644095000,0.00000000],[1769644351000,0.00000000],[1769644671000,0.00000000],[1769644991000,0.00000000],[1769645311000,0.00000000],[1769645567000,0.00000000],[1769645887000,0.00000000],[1769646207000,0.00000000],[1769646463000,0.00000000],[1769646783000,0.00000000],[1769647113000,0.00000000],[1769647375000,0.00000000],[1769647695000,0.00000000],[1769647951000,0.00000000],[1769648271000,0.00000000],[1769648591000,0.00000000],[1769648911000,0.00000000],[1769649167000,0.00000000],[1769649487000,0.00000000],[1769649807000,0.00000000],[1769650063000,0.00000000],[1769650383000,0.00000000],[1769650703000,0.00000000],[1769650959000,0.00000000],[1769651279000,0.00000000],[1769651599000,0.00000000],[1769651853000,0.12200000],[1769652191000,0.30500000],[1769652511000,0.30500000],[1769652767000,0.30500000],[1769653087000,0.30500000],[1769653407000,0.30500000],[1769653663000,0.30500000],[1769653983000,0.30500000],[1769654303000,0.30500000],[1769654559000,0.30500000],[1769654896000,0.30500000],[1769655151000,0.30500000],[1769655471000,0.30500000],[1769655791000,0.30500000],[1769656111000,0.30500000],[1769656368000,0.38620000],[1769656687000,0.50800000],[1769657007000,0.50800000],[1769657263000,0.50800000],], 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; }