var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1772838027000,-2.15000000],[1772838154000,-2.14000000],[1772838475000,-2.38000000],[1772838796000,-2.40000000],[1772839051000,-2.54000000],[1772839373000,-2.56000000],[1772839691000,-2.46000000],[1772840011000,-2.25000000],[1772840267000,-1.90000000],[1772840588000,-2.02000000],[1772840907000,-2.15000000],[1772841164000,-2.18000000],[1772841484000,-2.44000000],[1772841803000,-2.17500000],[1772842059000,-2.18000000],[1772842379000,-2.38000000],[1772842700000,-2.57500000],[1772842955000,-3.08000000],[1772843275000,-3.16000000],[1772843595000,-3.35000000],[1772843853000,-3.30000000],[1772844171000,-3.12000000],[1772844507000,-3.20000000],[1772844763000,-3.20000000],[1772845084000,-3.18000000],[1772845403000,-2.92500000],[1772845661000,-3.24000000],[1772845980000,-3.45000000],[1772846252000,-3.30000000],[1772846571000,-3.42000000],[1772846893000,-3.40000000],[1772847211000,-3.20000000],[1772847468000,-3.30000000],[1772847787000,-3.36000000],[1772848107000,-3.02500000],[1772848363000,-2.76000000],[1772848683000,-3.20000000],[1772849005000,-3.47500000],[1772849260000,-3.30000000],[1772849580000,-3.36000000],[1772849899000,-3.45000000],[1772850155000,-3.80000000],[1772850492000,-4.18000000],[1772850813000,-4.15000000],[1772851090000,-3.87500000],[1772851357000,-3.48000000],[1772851690000,-3.70000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1772838027000,-2.7],[1772838154000,-2.7],[1772838475000,-2.9],[1772838796000,-3],[1772839051000,-3.1],[1772839373000,-3],[1772839691000,-2.9],[1772840011000,-2.7],[1772840267000,-2.3],[1772840588000,-2.4],[1772840907000,-2.6],[1772841164000,-2.6],[1772841484000,-2.9],[1772841803000,-2.6],[1772842059000,-2.6],[1772842379000,-2.8],[1772842700000,-3],[1772842955000,-3.5],[1772843275000,-3.6],[1772843595000,-3.8],[1772843853000,-3.7],[1772844171000,-3.5],[1772844507000,-3.6],[1772844763000,-3.6],[1772845084000,-3.6],[1772845403000,-3.3],[1772845661000,-3.7],[1772845980000,-3.9],[1772846252000,-3.7],[1772846571000,-3.8],[1772846893000,-3.8],[1772847211000,-3.6],[1772847468000,-3.7],[1772847787000,-3.7],[1772848107000,-3.3],[1772848363000,-3],[1772848683000,-3.5],[1772849005000,-3.7],[1772849260000,-3.6],[1772849580000,-3.6],[1772849899000,-3.7],[1772850155000,-4.1],[1772850492000,-4.5],[1772850813000,-4.4],[1772851090000,-4.1],[1772851357000,-3.8],[1772851690000,-4],], 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: [[1772838027000,96.00000000],[1772838154000,96.00000000],[1772838475000,96.00000000],[1772838796000,96.00000000],[1772839051000,96.00000000],[1772839373000,96.80000000],[1772839691000,97.00000000],[1772840011000,97.00000000],[1772840267000,97.00000000],[1772840588000,97.00000000],[1772840907000,97.00000000],[1772841164000,97.00000000],[1772841484000,97.00000000],[1772841803000,97.00000000],[1772842059000,97.00000000],[1772842379000,97.00000000],[1772842700000,97.00000000],[1772842955000,97.00000000],[1772843275000,97.00000000],[1772843595000,97.00000000],[1772843853000,97.00000000],[1772844171000,97.00000000],[1772844507000,97.00000000],[1772844763000,97.00000000],[1772845084000,97.00000000],[1772845403000,97.00000000],[1772845661000,97.00000000],[1772845980000,97.00000000],[1772846252000,97.00000000],[1772846571000,97.00000000],[1772846893000,97.00000000],[1772847211000,97.00000000],[1772847468000,97.00000000],[1772847787000,97.80000000],[1772848107000,98.00000000],[1772848363000,98.00000000],[1772848683000,97.80000000],[1772849005000,98.00000000],[1772849260000,98.00000000],[1772849580000,98.00000000],[1772849899000,98.00000000],[1772850155000,97.80000000],[1772850492000,97.80000000],[1772850813000,98.00000000],[1772851090000,98.00000000],[1772851357000,98.00000000],[1772851690000,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: [[1772838027000,1028.5],[1772838154000,1028.6],[1772838475000,1028.7],[1772838796000,1028.6],[1772839051000,1028.6],[1772839373000,1028.7],[1772839691000,1028.6],[1772840011000,1028.7],[1772840267000,1028.7],[1772840588000,1028.7],[1772840907000,1028.8],[1772841164000,1028.8],[1772841484000,1028.9],[1772841803000,1028.9],[1772842059000,1028.9],[1772842379000,1029],[1772842700000,1029],[1772842955000,1029.1],[1772843275000,1029],[1772843595000,1029.1],[1772843853000,1029],[1772844171000,1029],[1772844507000,1029],[1772844763000,1028.9],[1772845084000,1028.9],[1772845403000,1028.9],[1772845661000,1028.9],[1772845980000,1029],[1772846252000,1028.8],[1772846571000,1028.8],[1772846893000,1028.7],[1772847211000,1028.6],[1772847468000,1028.5],[1772847787000,1028.6],[1772848107000,1028.5],[1772848363000,1028.5],[1772848683000,1028.6],[1772849005000,1028.4],[1772849260000,1028.5],[1772849580000,1028.5],[1772849899000,1028.4],[1772850155000,1028.5],[1772850492000,1028.5],[1772850813000,1028.5],[1772851090000,1028.6],[1772851357000,1028.6],[1772851690000,1028.6],], 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: [[1772838027000,0],[1772838154000,0],[1772838475000,0],[1772838796000,0],[1772839051000,0],[1772839373000,0],[1772839691000,0],[1772840011000,0],[1772840267000,0],[1772840588000,0],[1772840907000,0],[1772841164000,0],[1772841484000,0],[1772841803000,0],[1772842059000,0],[1772842379000,0],[1772842700000,0],[1772842955000,0],[1772843275000,0],[1772843595000,0],[1772843853000,0],[1772844171000,0],[1772844507000,0],[1772844763000,0],[1772845084000,0],[1772845403000,0],[1772845661000,0],[1772845980000,0],[1772846252000,0],[1772846571000,0],[1772846893000,0],[1772847211000,0],[1772847468000,0],[1772847787000,0],[1772848107000,0],[1772848363000,0],[1772848683000,0],[1772849005000,0],[1772849260000,0],[1772849580000,0],[1772849899000,0],[1772850155000,0],[1772850492000,0],[1772850813000,0],[1772851090000,0],[1772851357000,0],[1772851690000,0],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1772838027000,0],[1772838154000,0],[1772838475000,0],[1772838796000,0],[1772839051000,0],[1772839373000,0],[1772839691000,0],[1772840011000,0],[1772840267000,0],[1772840588000,0],[1772840907000,0],[1772841164000,0],[1772841484000,0],[1772841803000,0],[1772842059000,0],[1772842379000,0],[1772842700000,0],[1772842955000,0],[1772843275000,0],[1772843595000,0],[1772843853000,0],[1772844171000,0],[1772844507000,0],[1772844763000,0],[1772845084000,0],[1772845403000,0],[1772845661000,0],[1772845980000,0],[1772846252000,0],[1772846571000,0],[1772846893000,0],[1772847211000,0],[1772847468000,0],[1772847787000,0],[1772848107000,0],[1772848363000,0],[1772848683000,0],[1772849005000,0],[1772849260000,0],[1772849580000,0],[1772849899000,0],[1772850155000,0],[1772850492000,0],[1772850813000,0],[1772851090000,0],[1772851357000,0],[1772851690000,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: [[1772838027000,12.00000000],[1772838154000,12.00000000],[1772838475000,12.00000000],[1772838796000,12.00000000],[1772839051000,12.00000000],[1772839373000,12.00000000],[1772839691000,12.00000000],[1772840011000,12.75000000],[1772840267000,12.60000000],[1772840588000,12.00000000],[1772840907000,12.00000000],[1772841164000,12.00000000],[1772841484000,12.00000000],[1772841803000,12.00000000],[1772842059000,12.00000000],[1772842379000,12.00000000],[1772842700000,12.00000000],[1772842955000,14.00000000],[1772843275000,16.00000000],[1772843595000,16.25000000],[1772843853000,19.00000000],[1772844171000,12.60000000],[1772844507000,12.00000000],[1772844763000,12.00000000],[1772845084000,12.00000000],[1772845403000,13.00000000],[1772845661000,13.00000000],[1772845980000,5.25000000],[1772846252000,1.80000000],[1772846571000,7.80000000],[1772846893000,9.00000000],[1772847211000,9.00000000],[1772847468000,9.00000000],[1772847787000,9.00000000],[1772848107000,9.50000000],[1772848363000,9.20000000],[1772848683000,14.20000000],[1772849005000,11.75000000],[1772849260000,11.00000000],[1772849580000,11.00000000],[1772849899000,11.00000000],[1772850155000,11.00000000],[1772850492000,11.00000000],[1772850813000,11.00000000],[1772851090000,11.00000000],[1772851357000,11.00000000],[1772851690000,11.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: [[1772838027000,0.00000000],[1772838154000,0.00000000],[1772838475000,0.00000000],[1772838796000,0.00000000],[1772839051000,0.00000000],[1772839373000,0.00000000],[1772839691000,0.00000000],[1772840011000,0.00000000],[1772840267000,0.00000000],[1772840588000,0.00000000],[1772840907000,0.00000000],[1772841164000,0.00000000],[1772841484000,0.00000000],[1772841803000,0.00000000],[1772842059000,0.00000000],[1772842379000,0.00000000],[1772842700000,0.00000000],[1772842955000,0.00000000],[1772843275000,0.00000000],[1772843595000,0.00000000],[1772843853000,0.00000000],[1772844171000,0.00000000],[1772844507000,0.00000000],[1772844763000,0.00000000],[1772845084000,0.00000000],[1772845403000,0.00000000],[1772845661000,0.00000000],[1772845980000,0.00000000],[1772846252000,0.00000000],[1772846571000,0.00000000],[1772846893000,0.00000000],[1772847211000,0.00000000],[1772847468000,0.00000000],[1772847787000,0.00000000],[1772848107000,0.00000000],[1772848363000,0.00000000],[1772848683000,0.00000000],[1772849005000,0.00000000],[1772849260000,0.00000000],[1772849580000,0.00000000],[1772849899000,0.00000000],[1772850155000,0.00000000],[1772850492000,0.00000000],[1772850813000,0.00000000],[1772851090000,0.00000000],[1772851357000,0.00000000],[1772851690000,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: [[1772838027000,0.00000000],[1772838154000,0.00000000],[1772838475000,0.00000000],[1772838796000,0.00000000],[1772839051000,0.00000000],[1772839373000,0.00000000],[1772839691000,0.00000000],[1772840011000,0.00000000],[1772840267000,0.00000000],[1772840588000,0.00000000],[1772840907000,0.00000000],[1772841164000,0.00000000],[1772841484000,0.00000000],[1772841803000,0.00000000],[1772842059000,0.00000000],[1772842379000,0.00000000],[1772842700000,0.00000000],[1772842955000,0.00000000],[1772843275000,0.00000000],[1772843595000,0.00000000],[1772843853000,0.00000000],[1772844171000,0.00000000],[1772844507000,0.00000000],[1772844763000,0.00000000],[1772845084000,0.00000000],[1772845403000,0.00000000],[1772845661000,0.00000000],[1772845980000,0.00000000],[1772846252000,0.00000000],[1772846571000,0.00000000],[1772846893000,0.00000000],[1772847211000,0.00000000],[1772847468000,0.00000000],[1772847787000,0.00000000],[1772848107000,0.00000000],[1772848363000,0.00000000],[1772848683000,0.00000000],[1772849005000,0.00000000],[1772849260000,0.00000000],[1772849580000,0.00000000],[1772849899000,0.00000000],[1772850155000,0.00000000],[1772850492000,0.00000000],[1772850813000,0.00000000],[1772851090000,0.00000000],[1772851357000,0.00000000],[1772851690000,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: [[1772838027000,0.00000000],[1772838154000,0.00000000],[1772838475000,0.00000000],[1772838796000,0.00000000],[1772839051000,0.00000000],[1772839373000,0.00000000],[1772839691000,0.00000000],[1772840011000,0.00000000],[1772840267000,0.00000000],[1772840588000,0.00000000],[1772840907000,0.00000000],[1772841164000,0.00000000],[1772841484000,0.00000000],[1772841803000,0.00000000],[1772842059000,0.00000000],[1772842379000,0.00000000],[1772842700000,0.00000000],[1772842955000,0.00000000],[1772843275000,0.00000000],[1772843595000,0.00000000],[1772843853000,0.00000000],[1772844171000,0.00000000],[1772844507000,0.00000000],[1772844763000,0.00000000],[1772845084000,0.00000000],[1772845403000,0.00000000],[1772845661000,0.00000000],[1772845980000,0.00000000],[1772846252000,0.00000000],[1772846571000,0.00000000],[1772846893000,0.00000000],[1772847211000,0.00000000],[1772847468000,0.00000000],[1772847787000,0.00000000],[1772848107000,0.00000000],[1772848363000,0.00000000],[1772848683000,0.00000000],[1772849005000,0.00000000],[1772849260000,0.00000000],[1772849580000,0.00000000],[1772849899000,0.00000000],[1772850155000,0.00000000],[1772850492000,0.00000000],[1772850813000,0.00000000],[1772851090000,0.00000000],[1772851357000,0.00000000],[1772851690000,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; }