var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1771974026000,3.20000000],[1771974153000,3.53750000],[1771974474000,3.07777778],[1771974777000,2.18750000],[1771975050000,2.05000000],[1771975353000,2.15555556],[1771975673000,2.20000000],[1771975978000,2.22857143],[1771976250000,2.33333333],[1771976553000,2.45000000],[1771976873000,2.22000000],[1771977209000,1.90000000],[1771977497000,1.80000000],[1771977769000,1.80000000],[1771978074000,1.70000000],[1771978409000,1.60000000],[1771978650000,1.32222222],[1771978953000,1.24444444],[1771979274000,1.48750000],[1771979577000,1.51250000],[1771979850000,1.91111111],[1771980170000,2.48750000],[1771980474000,2.88888889],[1771980777000,3.01111111],[1771981081000,2.87500000],[1771981401000,2.90000000],[1771981673000,2.65555556],[1771981977000,2.72222222],[1771982282000,2.75000000],[1771982570000,2.34444444],[1771982874000,1.82857143],[1771983179000,1.43333333],[1771983450000,1.56000000],[1771983850000,1.74000000],[1771984074000,1.62500000],[1771984378000,1.60000000],[1771984650000,1.41111111],[1771984952000,1.47142857],[1771985273000,1.71428571],[1771985577000,1.90000000],[1771985881000,2.14000000],[1771986201000,2.13750000],[1771986473000,2.17500000],[1771986793000,1.85714286],[1771987097000,2.00000000],[1771987369000,1.83333333],[1771987673000,1.71666667],[1771987977000,1.68750000],[1771988250000,1.36666667],[1771988552000,1.62500000],[1771988874000,1.32000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1771974026000,0.3],[1771974153000,0.5],[1771974474000,0.3],[1771974777000,-0],[1771975050000,0.1],[1771975353000,0.2],[1771975673000,0.1],[1771975978000,0.1],[1771976250000,0.1],[1771976553000,0.1],[1771976873000,0.1],[1771977209000,-0.1],[1771977497000,-0.1],[1771977769000,-0.1],[1771978074000,-0.1],[1771978409000,-0.2],[1771978650000,-0.4],[1771978953000,-0.3],[1771979274000,-0.2],[1771979577000,-0.3],[1771979850000,-0.1],[1771980170000,-0],[1771980474000,-0],[1771980777000,-0],[1771981081000,-0.1],[1771981401000,-0.1],[1771981673000,-0.1],[1771981977000,-0.1],[1771982282000,-0.1],[1771982570000,-0.2],[1771982874000,-0.4],[1771983179000,-0.6],[1771983450000,-0.4],[1771983850000,-0.4],[1771984074000,-0.4],[1771984378000,-0.4],[1771984650000,-0.5],[1771984952000,-0.5],[1771985273000,-0.4],[1771985577000,-0.3],[1771985881000,-0.2],[1771986201000,-0.2],[1771986473000,-0.3],[1771986793000,-0.5],[1771987097000,-0.3],[1771987369000,-0.4],[1771987673000,-0.4],[1771987977000,-0.6],[1771988250000,-0.6],[1771988552000,-0.5],[1771988874000,-0.6],], 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: [[1771974026000,81.75000000],[1771974153000,80.75000000],[1771974474000,82.11111111],[1771974777000,85.50000000],[1771975050000,87.00000000],[1771975353000,86.77777778],[1771975673000,86.33333333],[1771975978000,86.00000000],[1771976250000,85.44444444],[1771976553000,84.50000000],[1771976873000,85.80000000],[1771977209000,87.00000000],[1771977497000,87.25000000],[1771977769000,87.25000000],[1771978074000,88.00000000],[1771978409000,88.00000000],[1771978650000,88.66666667],[1771978953000,89.88888889],[1771979274000,88.62500000],[1771979577000,88.00000000],[1771979850000,86.77777778],[1771980170000,83.62500000],[1771980474000,81.33333333],[1771980777000,80.77777778],[1771981081000,81.25000000],[1771981401000,81.00000000],[1771981673000,82.00000000],[1771981977000,81.88888889],[1771982282000,81.75000000],[1771982570000,83.22222222],[1771982874000,85.28571429],[1771983179000,86.66666667],[1771983450000,86.80000000],[1771983850000,86.00000000],[1771984074000,86.50000000],[1771984378000,86.50000000],[1771984650000,87.00000000],[1771984952000,87.00000000],[1771985273000,86.14285714],[1771985577000,85.62500000],[1771985881000,84.80000000],[1771986201000,84.75000000],[1771986473000,84.00000000],[1771986793000,84.85714286],[1771987097000,85.00000000],[1771987369000,85.33333333],[1771987673000,86.00000000],[1771987977000,85.25000000],[1771988250000,86.88888889],[1771988552000,86.12500000],[1771988874000,87.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: [[1771974026000,1023.3],[1771974153000,1023.3],[1771974474000,1023.4],[1771974777000,1023.6],[1771975050000,1023.7],[1771975353000,1023.6],[1771975673000,1023.6],[1771975978000,1023.7],[1771976250000,1023.6],[1771976553000,1023.5],[1771976873000,1023.7],[1771977209000,1023.7],[1771977497000,1023.7],[1771977769000,1023.8],[1771978074000,1023.8],[1771978409000,1023.8],[1771978650000,1024],[1771978953000,1023.9],[1771979274000,1023.9],[1771979577000,1023.8],[1771979850000,1023.7],[1771980170000,1023.8],[1771980474000,1023.6],[1771980777000,1023.7],[1771981081000,1023.7],[1771981401000,1023.7],[1771981673000,1023.7],[1771981977000,1023.7],[1771982282000,1023.8],[1771982570000,1023.9],[1771982874000,1024],[1771983179000,1024.1],[1771983450000,1024],[1771983850000,1024.1],[1771984074000,1024.2],[1771984378000,1024.1],[1771984650000,1024.2],[1771984952000,1024.2],[1771985273000,1024.1],[1771985577000,1024.1],[1771985881000,1024.1],[1771986201000,1023.9],[1771986473000,1024.1],[1771986793000,1024.1],[1771987097000,1024.1],[1771987369000,1024.1],[1771987673000,1024.1],[1771987977000,1024.2],[1771988250000,1024.3],[1771988552000,1024.3],[1771988874000,1024.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: [[1771974026000,4.59],[1771974153000,4.905],[1771974474000,1.44],[1771974777000,2.16],[1771975050000,1.935],[1771975353000,1.479999996],[1771975673000,1.839999996],[1771975978000,1.645714296],[1771976250000,3.920000004],[1771976553000,2.7],[1771976873000,1.44],[1771977209000,2.52],[1771977497000,3.42],[1771977769000,3.24],[1771978074000,0.925714296],[1771978409000,1.739999988],[1771978650000,3.039999984],[1771978953000,2.88],[1771979274000,2.025],[1771979577000,1.62],[1771979850000,0.680000004],[1771980170000,1.17],[1771980474000,3.200000004],[1771980777000,2.16],[1771981081000,2.565],[1771981401000,2.25],[1771981673000,0.600000012],[1771981977000,2.639999988],[1771982282000,2.97],[1771982570000,2.559999996],[1771982874000,2.16],[1771983179000,0.960000012],[1771983450000,1.8],[1771983850000,1.8],[1771984074000,2.205],[1771984378000,1.98],[1771984650000,1.559999988],[1771984952000,2.828571444],[1771985273000,2.777142852],[1771985577000,1.935],[1771985881000,1.656],[1771986201000,1.62],[1771986473000,2.025],[1771986793000,1.748571444],[1771987097000,2.016],[1771987369000,1.919999988],[1771987673000,2.639999988],[1771987977000,2.475],[1771988250000,1.320000012],[1771988552000,2.295],[1771988874000,2.16],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1771974026000,5.67],[1771974153000,6.615],[1771974474000,2.52],[1771974777000,2.835],[1771975050000,2.835],[1771975353000,2.239999992],[1771975673000,2.52],[1771975978000,2.88],[1771976250000,4.759999992],[1771976553000,3.78],[1771976873000,2.016],[1771977209000,3.024],[1771977497000,4.41],[1771977769000,3.78],[1771978074000,2.16],[1771978409000,2.52],[1771978650000,3.639999996],[1771978953000,3.639999996],[1771979274000,2.835],[1771979577000,2.52],[1771979850000,1.959999984],[1771980170000,2.52],[1771980474000,4.759999992],[1771980777000,3.080000016],[1771981081000,3.78],[1771981401000,2.835],[1771981673000,1.119999996],[1771981977000,3.920000004],[1771982282000,3.78],[1771982570000,2.800000008],[1771982874000,2.88],[1771983179000,1.680000012],[1771983450000,2.52],[1771983850000,3.024],[1771984074000,3.15],[1771984378000,2.52],[1771984650000,2.52],[1771984952000,3.24],[1771985273000,3.6],[1771985577000,2.52],[1771985881000,2.52],[1771986201000,2.205],[1771986473000,2.835],[1771986793000,2.88],[1771987097000,2.52],[1771987369000,2.52],[1771987673000,3.359999988],[1771987977000,3.15],[1771988250000,1.959999984],[1771988552000,2.52],[1771988874000,2.52],], 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: [[1771974026000,247.50000000],[1771974153000,236.37500000],[1771974474000,283.00000000],[1771974777000,306.87500000],[1771975050000,304.25000000],[1771975353000,305.88888889],[1771975673000,314.44444444],[1771975978000,315.14285714],[1771976250000,287.11111111],[1771976553000,303.00000000],[1771976873000,316.60000000],[1771977209000,313.40000000],[1771977497000,307.75000000],[1771977769000,312.00000000],[1771978074000,312.28571429],[1771978409000,311.00000000],[1771978650000,312.22222222],[1771978953000,312.77777778],[1771979274000,310.37500000],[1771979577000,308.00000000],[1771979850000,308.11111111],[1771980170000,311.12500000],[1771980474000,319.22222222],[1771980777000,327.66666667],[1771981081000,324.50000000],[1771981401000,290.12500000],[1771981673000,307.66666667],[1771981977000,300.77777778],[1771982282000,306.00000000],[1771982570000,293.44444444],[1771982874000,288.57142857],[1771983179000,300.33333333],[1771983450000,303.00000000],[1771983850000,308.60000000],[1771984074000,308.62500000],[1771984378000,315.37500000],[1771984650000,317.88888889],[1771984952000,317.00000000],[1771985273000,315.00000000],[1771985577000,316.75000000],[1771985881000,316.40000000],[1771986201000,309.62500000],[1771986473000,310.50000000],[1771986793000,311.57142857],[1771987097000,314.40000000],[1771987369000,313.66666667],[1771987673000,314.83333333],[1771987977000,315.00000000],[1771988250000,313.44444444],[1771988552000,310.50000000],[1771988874000,309.20000000],], 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: [[1771974026000,0.00000000],[1771974153000,0.00000000],[1771974474000,0.00000000],[1771974777000,0.00000000],[1771975050000,0.00000000],[1771975353000,0.00000000],[1771975673000,0.00000000],[1771975978000,0.00000000],[1771976250000,0.00000000],[1771976553000,0.00000000],[1771976873000,0.00000000],[1771977209000,0.00000000],[1771977497000,0.00000000],[1771977769000,0.00000000],[1771978074000,0.00000000],[1771978409000,0.00000000],[1771978650000,0.00000000],[1771978953000,0.00000000],[1771979274000,0.00000000],[1771979577000,0.00000000],[1771979850000,0.00000000],[1771980170000,0.00000000],[1771980474000,0.00000000],[1771980777000,0.00000000],[1771981081000,0.00000000],[1771981401000,0.00000000],[1771981673000,0.00000000],[1771981977000,0.00000000],[1771982282000,0.00000000],[1771982570000,0.00000000],[1771982874000,0.00000000],[1771983179000,0.00000000],[1771983450000,0.00000000],[1771983850000,0.00000000],[1771984074000,0.00000000],[1771984378000,0.00000000],[1771984650000,0.00000000],[1771984952000,0.00000000],[1771985273000,0.00000000],[1771985577000,0.00000000],[1771985881000,0.00000000],[1771986201000,0.00000000],[1771986473000,0.00000000],[1771986793000,0.00000000],[1771987097000,0.00000000],[1771987369000,0.00000000],[1771987673000,0.00000000],[1771987977000,0.00000000],[1771988250000,0.00000000],[1771988552000,0.00000000],[1771988874000,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: [[1771974026000,0.00000000],[1771974153000,0.00000000],[1771974474000,0.00000000],[1771974777000,0.00000000],[1771975050000,0.00000000],[1771975353000,0.00000000],[1771975673000,0.00000000],[1771975978000,0.00000000],[1771976250000,0.00000000],[1771976553000,0.00000000],[1771976873000,0.00000000],[1771977209000,0.00000000],[1771977497000,0.00000000],[1771977769000,0.00000000],[1771978074000,0.00000000],[1771978409000,0.00000000],[1771978650000,0.00000000],[1771978953000,0.00000000],[1771979274000,0.00000000],[1771979577000,0.00000000],[1771979850000,0.00000000],[1771980170000,0.00000000],[1771980474000,0.00000000],[1771980777000,0.00000000],[1771981081000,0.00000000],[1771981401000,0.00000000],[1771981673000,0.00000000],[1771981977000,0.00000000],[1771982282000,0.00000000],[1771982570000,0.00000000],[1771982874000,0.00000000],[1771983179000,0.00000000],[1771983450000,0.00000000],[1771983850000,0.00000000],[1771984074000,0.00000000],[1771984378000,0.00000000],[1771984650000,0.00000000],[1771984952000,0.00000000],[1771985273000,0.00000000],[1771985577000,0.00000000],[1771985881000,0.00000000],[1771986201000,0.00000000],[1771986473000,0.00000000],[1771986793000,0.00000000],[1771987097000,0.00000000],[1771987369000,0.00000000],[1771987673000,0.00000000],[1771987977000,0.00000000],[1771988250000,0.00000000],[1771988552000,0.00000000],[1771988874000,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: [[1771974026000,0.00000000],[1771974153000,0.00000000],[1771974474000,0.00000000],[1771974777000,0.00000000],[1771975050000,0.00000000],[1771975353000,0.00000000],[1771975673000,0.00000000],[1771975978000,0.00000000],[1771976250000,0.00000000],[1771976553000,0.00000000],[1771976873000,0.00000000],[1771977209000,0.00000000],[1771977497000,0.00000000],[1771977769000,0.00000000],[1771978074000,0.00000000],[1771978409000,0.00000000],[1771978650000,0.00000000],[1771978953000,0.00000000],[1771979274000,0.00000000],[1771979577000,0.00000000],[1771979850000,0.00000000],[1771980170000,0.00000000],[1771980474000,0.00000000],[1771980777000,0.00000000],[1771981081000,0.00000000],[1771981401000,0.00000000],[1771981673000,0.00000000],[1771981977000,0.00000000],[1771982282000,0.00000000],[1771982570000,0.00000000],[1771982874000,0.00000000],[1771983179000,0.00000000],[1771983450000,0.00000000],[1771983850000,0.00000000],[1771984074000,0.00000000],[1771984378000,0.00000000],[1771984650000,0.00000000],[1771984952000,0.00000000],[1771985273000,0.00000000],[1771985577000,0.00000000],[1771985881000,0.00000000],[1771986201000,0.00000000],[1771986473000,0.00000000],[1771986793000,0.00000000],[1771987097000,0.00000000],[1771987369000,0.00000000],[1771987673000,0.00000000],[1771987977000,0.00000000],[1771988250000,0.00000000],[1771988552000,0.00000000],[1771988874000,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; }