var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1778968802000,9.90000000],[1778969106000,9.90000000],[1778969282000,9.90000000],[1778969602000,9.90000000],[1778969874000,9.90000000],[1778970178000,9.90000000],[1778970450000,9.92500000],[1778970802000,10.00000000],[1778971074000,10.00000000],[1778971378000,10.07142857],[1778971650000,10.10000000],[1778972002000,10.11428571],[1778972274000,10.23750000],[1778972578000,10.35714286],[1778972850000,10.44444444],[1778973153000,10.56666667],[1778973473000,10.65555556],[1778973777000,10.62857143],[1778974081000,10.70000000],[1778974353000,10.65714286],[1778974673000,10.65000000],[1778974993000,10.68333333],[1778975297000,10.80000000],[1778975570000,10.80000000],[1778975889000,10.80000000],[1778976178000,10.80000000],[1778976529000,10.80000000],[1778976770000,10.86666667],[1778977105000,10.90000000],[1778977489000,10.76666667],[1778977650000,10.75000000],[1778978001000,10.80000000],[1778978449000,10.80000000],[1778978577000,10.80000000],[1778978897000,10.80000000],[1778979153000,10.83333333],[1778979476000,10.85000000],[1778979793000,10.90000000],[1778980114000,10.83333333],[1778980497000,10.80000000],[1778980689000,10.80000000],[1778981073000,10.86666667],[1778981281000,10.86666667],[1778981553000,10.85714286],[1778981873000,10.90000000],[1778982177000,10.92500000],[1778982481000,11.00000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1778968802000,9.1],[1778969106000,9.1],[1778969282000,9.1],[1778969602000,9.1],[1778969874000,9],[1778970178000,9],[1778970450000,9],[1778970802000,8.9],[1778971074000,8.9],[1778971378000,8.8],[1778971650000,8.9],[1778972002000,8.8],[1778972274000,8.7],[1778972578000,8.6],[1778972850000,8.6],[1778973153000,8.6],[1778973473000,8.6],[1778973777000,8.5],[1778974081000,8.5],[1778974353000,8.5],[1778974673000,8.4],[1778974993000,8.3],[1778975297000,8.4],[1778975570000,8.4],[1778975889000,8.3],[1778976178000,8.2],[1778976529000,8.2],[1778976770000,8.2],[1778977105000,8.2],[1778977489000,8.1],[1778977650000,8.1],[1778978001000,8.2],[1778978449000,8.2],[1778978577000,8],[1778978897000,8],[1778979153000,8],[1778979476000,8],[1778979793000,7.9],[1778980114000,8],[1778980497000,8],[1778980689000,8],[1778981073000,7.9],[1778981281000,8.1],[1778981553000,7.9],[1778981873000,7.9],[1778982177000,7.9],[1778982481000,7.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: [[1778968802000,95.00000000],[1778969106000,95.00000000],[1778969282000,95.00000000],[1778969602000,94.85714286],[1778969874000,94.00000000],[1778970178000,94.00000000],[1778970450000,94.00000000],[1778970802000,93.00000000],[1778971074000,93.00000000],[1778971378000,92.14285714],[1778971650000,92.37500000],[1778972002000,91.57142857],[1778972274000,90.50000000],[1778972578000,89.14285714],[1778972850000,88.55555556],[1778973153000,87.66666667],[1778973473000,87.00000000],[1778973777000,86.57142857],[1778974081000,86.42857143],[1778974353000,86.57142857],[1778974673000,86.33333333],[1778974993000,85.33333333],[1778975297000,85.00000000],[1778975570000,85.00000000],[1778975889000,84.80000000],[1778976178000,84.33333333],[1778976529000,84.00000000],[1778976770000,83.66666667],[1778977105000,83.66666667],[1778977489000,84.00000000],[1778977650000,83.83333333],[1778978001000,84.00000000],[1778978449000,84.00000000],[1778978577000,83.25000000],[1778978897000,83.00000000],[1778979153000,82.66666667],[1778979476000,82.83333333],[1778979793000,82.16666667],[1778980114000,82.66666667],[1778980497000,83.00000000],[1778980689000,83.00000000],[1778981073000,82.00000000],[1778981281000,83.00000000],[1778981553000,82.28571429],[1778981873000,82.00000000],[1778982177000,82.00000000],[1778982481000,81.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: [[1778968802000,1010.6],[1778969106000,1010.7],[1778969282000,1010.7],[1778969602000,1010.7],[1778969874000,1010.9],[1778970178000,1010.9],[1778970450000,1010.9],[1778970802000,1010.9],[1778971074000,1011],[1778971378000,1010.9],[1778971650000,1011],[1778972002000,1011],[1778972274000,1011.1],[1778972578000,1011.2],[1778972850000,1011],[1778973153000,1011],[1778973473000,1011],[1778973777000,1011.1],[1778974081000,1011.1],[1778974353000,1011.1],[1778974673000,1011.2],[1778974993000,1011.2],[1778975297000,1011.2],[1778975570000,1011.2],[1778975889000,1011.3],[1778976178000,1011.3],[1778976529000,1011.4],[1778976770000,1011.3],[1778977105000,1011.4],[1778977489000,1011.5],[1778977650000,1011.5],[1778978001000,1011.5],[1778978449000,1011.5],[1778978577000,1011.7],[1778978897000,1011.6],[1778979153000,1011.6],[1778979476000,1011.7],[1778979793000,1011.8],[1778980114000,1011.7],[1778980497000,1011.9],[1778980689000,1011.7],[1778981073000,1011.8],[1778981281000,1011.8],[1778981553000,1011.8],[1778981873000,1011.7],[1778982177000,1011.8],[1778982481000,1011.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: [[1778968802000,6.48],[1778969106000,8.759999988],[1778969282000,9.405],[1778969602000,9.051428556],[1778969874000,7.480000008],[1778970178000,6.942857148],[1778970450000,8.55],[1778970802000,8.382857148],[1778971074000,8.01],[1778971378000,8.537142852],[1778971650000,7.965],[1778972002000,10.954285704],[1778972274000,10.89],[1778972578000,8.331428556],[1778972850000,9.680000004],[1778973153000,11.88],[1778973473000,8.920000008],[1778973777000,11.88],[1778974081000,10.388571444],[1778974353000,7.457142852],[1778974673000,7.92],[1778974993000,10.320000012],[1778975297000,5.94],[1778975570000,9.060000012],[1778975889000,8.856],[1778976178000,12.24],[1778976529000,12.719999988],[1778976770000,10.62],[1778977105000,8.399999988],[1778977489000,4.079999988],[1778977650000,9.36],[1778978001000,10.8],[1778978449000,6.3],[1778978577000,9.72],[1778978897000,10.98],[1778979153000,8.399999988],[1778979476000,9.54],[1778979793000,7.679999988],[1778980114000,10.559999988],[1778980497000,8.28],[1778980689000,9.216],[1778981073000,11.16],[1778981281000,6.959999988],[1778981553000,10.08],[1778981873000,9.315],[1778982177000,10.62],[1778982481000,10.08],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1778968802000,7.56],[1778969106000,11.999999988],[1778969282000,13.545],[1778969602000,12.857142852],[1778969874000,11.319999984],[1778970178000,10.234285704],[1778970450000,12.15],[1778970802000,12.137142852],[1778971074000,11.835],[1778971378000,13.217142852],[1778971650000,12.195],[1778972002000,14.708571444],[1778972274000,16.695],[1778972578000,11.365714296],[1778972850000,13.68],[1778973153000,18.240000012],[1778973473000,12.840000012],[1778973777000,17.588571444],[1778974081000,14.657142852],[1778974353000,10.954285704],[1778974673000,11.580000012],[1778974993000,14.94],[1778975297000,11.52],[1778975570000,15.419999988],[1778975889000,11.736],[1778976178000,18],[1778976529000,17.160000012],[1778976770000,15.84],[1778977105000,11.88],[1778977489000,5.879999988],[1778977650000,13.259999988],[1778978001000,14.13],[1778978449000,9],[1778978577000,14.67],[1778978897000,18],[1778979153000,11.040000012],[1778979476000,13.740000012],[1778979793000,11.940000012],[1778980114000,15.48],[1778980497000,11.040000012],[1778980689000,14.4],[1778981073000,16.319999988],[1778981281000,8.399999988],[1778981553000,14.297142852],[1778981873000,12.51],[1778982177000,15.075],[1778982481000,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: [[1778968802000,266.00000000],[1778969106000,298.66666667],[1778969282000,304.75000000],[1778969602000,273.00000000],[1778969874000,294.00000000],[1778970178000,308.85714286],[1778970450000,287.75000000],[1778970802000,171.42857143],[1778971074000,235.37500000],[1778971378000,315.57142857],[1778971650000,309.12500000],[1778972002000,169.28571429],[1778972274000,210.62500000],[1778972578000,268.14285714],[1778972850000,302.33333333],[1778973153000,199.66666667],[1778973473000,301.44444444],[1778973777000,254.14285714],[1778974081000,266.42857143],[1778974353000,246.28571429],[1778974673000,295.66666667],[1778974993000,228.83333333],[1778975297000,333.00000000],[1778975570000,257.83333333],[1778975889000,246.40000000],[1778976178000,302.66666667],[1778976529000,107.66666667],[1778976770000,194.83333333],[1778977105000,319.33333333],[1778977489000,305.33333333],[1778977650000,150.83333333],[1778978001000,306.75000000],[1778978449000,320.00000000],[1778978577000,329.50000000],[1778978897000,218.25000000],[1778979153000,221.00000000],[1778979476000,261.16666667],[1778979793000,203.66666667],[1778980114000,313.00000000],[1778980497000,306.00000000],[1778980689000,303.40000000],[1778981073000,293.00000000],[1778981281000,255.00000000],[1778981553000,190.71428571],[1778981873000,281.87500000],[1778982177000,290.25000000],[1778982481000,34.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: [[1778968802000,0.00000000],[1778969106000,0.00000000],[1778969282000,0.00000000],[1778969602000,0.00000000],[1778969874000,0.00000000],[1778970178000,0.00000000],[1778970450000,0.00000000],[1778970802000,0.00000000],[1778971074000,0.00000000],[1778971378000,0.00000000],[1778971650000,0.00000000],[1778972002000,0.00000000],[1778972274000,0.00000000],[1778972578000,0.00000000],[1778972850000,0.00000000],[1778973153000,0.00000000],[1778973473000,0.00000000],[1778973777000,0.00000000],[1778974081000,0.00000000],[1778974353000,0.00000000],[1778974673000,0.00000000],[1778974993000,0.00000000],[1778975297000,0.00000000],[1778975570000,0.00000000],[1778975889000,0.00000000],[1778976178000,0.00000000],[1778976529000,0.00000000],[1778976770000,0.00000000],[1778977105000,0.00000000],[1778977489000,0.00000000],[1778977650000,0.00000000],[1778978001000,0.00000000],[1778978449000,0.00000000],[1778978577000,0.00000000],[1778978897000,0.00000000],[1778979153000,0.00000000],[1778979476000,0.00000000],[1778979793000,0.00000000],[1778980114000,0.00000000],[1778980497000,0.00000000],[1778980689000,0.00000000],[1778981073000,0.00000000],[1778981281000,0.00000000],[1778981553000,0.00000000],[1778981873000,0.00000000],[1778982177000,0.00000000],[1778982481000,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: [[1778968802000,0.00000000],[1778969106000,0.00000000],[1778969282000,0.00000000],[1778969602000,0.00000000],[1778969874000,0.00000000],[1778970178000,0.00000000],[1778970450000,0.00000000],[1778970802000,0.00000000],[1778971074000,0.00000000],[1778971378000,0.00000000],[1778971650000,0.00000000],[1778972002000,0.00000000],[1778972274000,0.00000000],[1778972578000,0.00000000],[1778972850000,0.00000000],[1778973153000,0.00000000],[1778973473000,0.00000000],[1778973777000,0.00000000],[1778974081000,0.00000000],[1778974353000,0.00000000],[1778974673000,0.00000000],[1778974993000,0.00000000],[1778975297000,0.00000000],[1778975570000,0.00000000],[1778975889000,0.00000000],[1778976178000,0.00000000],[1778976529000,0.00000000],[1778976770000,0.00000000],[1778977105000,0.00000000],[1778977489000,0.00000000],[1778977650000,0.00000000],[1778978001000,0.00000000],[1778978449000,0.00000000],[1778978577000,0.00000000],[1778978897000,0.00000000],[1778979153000,0.00000000],[1778979476000,0.00000000],[1778979793000,0.00000000],[1778980114000,0.00000000],[1778980497000,0.00000000],[1778980689000,0.00000000],[1778981073000,0.00000000],[1778981281000,0.00000000],[1778981553000,0.00000000],[1778981873000,0.00000000],[1778982177000,0.00000000],[1778982481000,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: [[1778968802000,0.00000000],[1778969106000,0.00000000],[1778969282000,0.10150000],[1778969602000,0.20300000],[1778969874000,0.20300000],[1778970178000,0.20300000],[1778970450000,0.20300000],[1778970802000,0.20300000],[1778971074000,0.20300000],[1778971378000,0.20300000],[1778971650000,0.20300000],[1778972002000,0.20300000],[1778972274000,0.20300000],[1778972578000,0.20300000],[1778972850000,0.20300000],[1778973153000,0.20300000],[1778973473000,0.20300000],[1778973777000,0.20300000],[1778974081000,0.20300000],[1778974353000,0.20300000],[1778974673000,0.20300000],[1778974993000,0.20300000],[1778975297000,0.20300000],[1778975570000,0.20300000],[1778975889000,0.20300000],[1778976178000,0.20300000],[1778976529000,0.20300000],[1778976770000,0.20300000],[1778977105000,0.20300000],[1778977489000,0.20300000],[1778977650000,0.20300000],[1778978001000,0.20300000],[1778978449000,0.20300000],[1778978577000,0.20300000],[1778978897000,0.20300000],[1778979153000,0.20300000],[1778979476000,0.20300000],[1778979793000,0.20300000],[1778980114000,0.20300000],[1778980497000,0.20300000],[1778980689000,0.20300000],[1778981073000,0.20300000],[1778981281000,0.20300000],[1778981553000,0.20300000],[1778981873000,0.20300000],[1778982177000,0.20300000],[1778982481000,0.20300000],], 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; }