var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1770678008000,5.10000000],[1770678193000,5.04000000],[1770678501000,5.00000000],[1770678809000,5.00000000],[1770679056000,5.00000000],[1770679364000,5.02000000],[1770679672000,5.08000000],[1770679980000,5.08000000],[1770680287000,5.02000000],[1770680601000,5.02000000],[1770680909000,4.97500000],[1770681155000,4.96000000],[1770681463000,4.92000000],[1770681772000,4.94000000],[1770682080000,4.90000000],[1770682388000,4.90000000],[1770682696000,4.90000000],[1770683004000,4.90000000],[1770683251000,4.94000000],[1770683560000,4.90000000],[1770683868000,4.86000000],[1770684176000,4.88000000],[1770684485000,4.92000000],[1770684793000,4.90000000],[1770685101000,4.88000000],[1770685410000,4.90000000],[1770685656000,4.90000000],[1770685964000,4.90000000],[1770686273000,4.94000000],[1770686581000,4.90000000],[1770686890000,4.94000000],[1770687198000,5.00000000],[1770687507000,4.95000000],[1770687754000,4.90000000],[1770688063000,4.90000000],[1770688372000,4.90000000],[1770688681000,4.90000000],[1770688990000,4.90000000],[1770689299000,4.88000000],[1770689608000,4.85000000],[1770689855000,4.80000000],[1770690164000,4.80000000],[1770690472000,4.80000000],[1770690782000,4.80000000],[1770691090000,4.76000000],[1770691399000,4.70000000],[1770691708000,4.62500000],[1770691955000,4.70000000],[1770692264000,4.66000000],[1770692573000,4.58000000],[1770692882000,4.48000000],[1770693191000,4.50000000],[1770693500000,4.50000000],[1770693809000,4.52500000],[1770694056000,4.52000000],[1770694364000,4.42000000],[1770694674000,4.48000000],[1770694983000,4.50000000],[1770695291000,4.50000000],[1770695600000,4.50000000],[1770695909000,4.50000000],[1770696156000,4.52000000],[1770696465000,4.50000000],[1770696774000,4.50000000],[1770697083000,4.42000000],[1770697393000,4.36000000],[1770697702000,4.32000000],[1770698011000,4.40000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1770678008000,2.2],[1770678193000,2.1],[1770678501000,2.1],[1770678809000,2.1],[1770679056000,2.1],[1770679364000,2.1],[1770679672000,2.2],[1770679980000,2.2],[1770680287000,2.1],[1770680601000,2.1],[1770680909000,2.1],[1770681155000,2.1],[1770681463000,2.1],[1770681772000,2.1],[1770682080000,2.1],[1770682388000,2.1],[1770682696000,2.1],[1770683004000,2.1],[1770683251000,2.1],[1770683560000,2.1],[1770683868000,2.1],[1770684176000,2.1],[1770684485000,2.2],[1770684793000,2.2],[1770685101000,2.2],[1770685410000,2.2],[1770685656000,2.2],[1770685964000,2.2],[1770686273000,2.3],[1770686581000,2.2],[1770686890000,2.3],[1770687198000,2.3],[1770687507000,2.3],[1770687754000,2.3],[1770688063000,2.3],[1770688372000,2.3],[1770688681000,2.3],[1770688990000,2.3],[1770689299000,2.4],[1770689608000,2.4],[1770689855000,2.3],[1770690164000,2.3],[1770690472000,2.3],[1770690782000,2.3],[1770691090000,2.2],[1770691399000,2.2],[1770691708000,2.1],[1770691955000,2.2],[1770692264000,2.1],[1770692573000,2],[1770692882000,2],[1770693191000,2],[1770693500000,2],[1770693809000,2],[1770694056000,2],[1770694364000,1.9],[1770694674000,1.9],[1770694983000,1.9],[1770695291000,1.9],[1770695600000,1.9],[1770695909000,1.9],[1770696156000,1.9],[1770696465000,1.9],[1770696774000,1.8],[1770697083000,1.8],[1770697393000,1.7],[1770697702000,1.7],[1770698011000,1.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: [[1770678008000,81.46666667],[1770678193000,81.58000000],[1770678501000,81.74000000],[1770678809000,81.67500000],[1770679056000,81.74000000],[1770679364000,81.68000000],[1770679672000,81.60000000],[1770679980000,81.62000000],[1770680287000,81.78000000],[1770680601000,81.84000000],[1770680909000,81.97500000],[1770681155000,82.04000000],[1770681463000,82.12000000],[1770681772000,82.10000000],[1770682080000,82.26000000],[1770682388000,82.28000000],[1770682696000,82.38000000],[1770683004000,82.37500000],[1770683251000,82.30000000],[1770683560000,82.46000000],[1770683868000,82.62000000],[1770684176000,82.70000000],[1770684485000,82.58000000],[1770684793000,82.72000000],[1770685101000,82.84000000],[1770685410000,82.67500000],[1770685656000,82.88000000],[1770685964000,83.04000000],[1770686273000,82.98000000],[1770686581000,83.10000000],[1770686890000,83.06000000],[1770687198000,82.84000000],[1770687507000,82.97500000],[1770687754000,83.36000000],[1770688063000,83.56000000],[1770688372000,83.56000000],[1770688681000,83.60000000],[1770688990000,83.58000000],[1770689299000,83.90000000],[1770689608000,84.10000000],[1770689855000,84.14000000],[1770690164000,84.24000000],[1770690472000,84.06000000],[1770690782000,84.04000000],[1770691090000,83.96000000],[1770691399000,84.04000000],[1770691708000,84.02500000],[1770691955000,83.86000000],[1770692264000,83.64000000],[1770692573000,83.78000000],[1770692882000,84.00000000],[1770693191000,84.04000000],[1770693500000,83.92000000],[1770693809000,83.90000000],[1770694056000,83.74000000],[1770694364000,83.76000000],[1770694674000,83.64000000],[1770694983000,83.58000000],[1770695291000,83.50000000],[1770695600000,83.40000000],[1770695909000,83.40000000],[1770696156000,83.34000000],[1770696465000,83.20000000],[1770696774000,83.08000000],[1770697083000,83.02000000],[1770697393000,83.16000000],[1770697702000,83.20000000],[1770698011000,83.20000000],], 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: [[1770678008000,1010.6],[1770678193000,1010.6],[1770678501000,1010.6],[1770678809000,1010.6],[1770679056000,1010.5],[1770679364000,1010.5],[1770679672000,1010.4],[1770679980000,1010.4],[1770680287000,1010.4],[1770680601000,1010.4],[1770680909000,1010.4],[1770681155000,1010.4],[1770681463000,1010.3],[1770681772000,1010.3],[1770682080000,1010.3],[1770682388000,1010.3],[1770682696000,1010.2],[1770683004000,1010.2],[1770683251000,1010.2],[1770683560000,1010.2],[1770683868000,1010.1],[1770684176000,1010.1],[1770684485000,1010.1],[1770684793000,1010.1],[1770685101000,1010],[1770685410000,1010],[1770685656000,1010],[1770685964000,1009.9],[1770686273000,1009.8],[1770686581000,1009.8],[1770686890000,1009.8],[1770687198000,1009.8],[1770687507000,1009.7],[1770687754000,1009.7],[1770688063000,1009.6],[1770688372000,1009.6],[1770688681000,1009.6],[1770688990000,1009.5],[1770689299000,1009.5],[1770689608000,1009.5],[1770689855000,1009.4],[1770690164000,1009.4],[1770690472000,1009.3],[1770690782000,1009.3],[1770691090000,1009.3],[1770691399000,1009.3],[1770691708000,1009.3],[1770691955000,1009.2],[1770692264000,1009.1],[1770692573000,1009.1],[1770692882000,1009.1],[1770693191000,1009.1],[1770693500000,1009.1],[1770693809000,1009.1],[1770694056000,1009.1],[1770694364000,1009.1],[1770694674000,1009.1],[1770694983000,1009],[1770695291000,1009],[1770695600000,1009],[1770695909000,1009],[1770696156000,1009],[1770696465000,1008.9],[1770696774000,1008.8],[1770697083000,1008.7],[1770697393000,1008.7],[1770697702000,1008.7],[1770698011000,1008.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); }); $('.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; }