var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1787608832000,21.20000000],[1787608954000,21.12500000],[1787609252000,21.14285714],[1787609574000,21.20000000],[1787609852000,21.15000000],[1787610150000,21.12000000],[1787610453000,21.03333333],[1787610775000,21.00000000],[1787611111000,21.10000000],[1787611413000,21.10000000],[1787611654000,21.01666667],[1787612013000,21.02000000],[1787612253000,21.04000000],[1787612553000,21.00000000],[1787612902000,20.95000000],[1787613191000,20.90000000],[1787613495000,20.82000000],[1787613750000,20.90000000],[1787614053000,20.83333333],[1787614352000,20.74000000],[1787614652000,20.54000000],[1787614952000,20.04285714],[1787615287000,19.74000000],[1787615591000,19.70000000],[1787615852000,19.84000000],[1787616150000,19.76000000],[1787616514000,19.65000000],[1787616813000,19.38000000],[1787617052000,19.14285714],[1787617350000,19.10000000],[1787617653000,19.14000000],[1787617952000,19.21666667],[1787618313000,19.37500000],[1787618550000,19.34000000],[1787618853000,19.22000000],[1787619152000,19.20000000],[1787619496000,19.05000000],[1787619750000,19.10000000],[1787620070000,19.20000000],[1787620353000,19.05714286],[1787620713000,19.10000000],[1787620950000,19.10000000],[1787621254000,19.00000000],[1787621612000,19.05000000],[1787621853000,18.98333333],[1787622151000,18.86666667],[1787622452000,18.68333333],[1787622752000,18.50000000],[1787623095000,18.67500000],[1787623353000,18.86000000],[1787623713000,18.70000000],[1787623952000,18.92500000],[1787624253000,18.86666667],[1787624552000,18.78333333],[1787624886000,18.70000000],[1787625212000,18.58000000],[1787625514000,18.56666667],[1787625752000,18.84000000],[1787626112000,18.74000000],[1787626391000,18.70000000],[1787626653000,18.51666667],[1787626983000,18.62000000],[1787627313000,18.60000000],[1787627552000,18.43333333],[1787627912000,18.50000000],[1787628213000,18.68000000],[1787628452000,18.55000000],[1787628812000,18.66666667],[1787629053000,18.68333333],[1787629353000,18.72500000],[1787629703000,18.76666667],[1787630014000,18.80000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1787608832000,9.1],[1787608954000,9],[1787609252000,9],[1787609574000,9.1],[1787609852000,9],[1787610150000,9],[1787610453000,9],[1787610775000,8.9],[1787611111000,9],[1787611413000,9],[1787611654000,8.9],[1787612013000,8.9],[1787612253000,8.9],[1787612553000,8.9],[1787612902000,8.8],[1787613191000,8.9],[1787613495000,8.7],[1787613750000,8.8],[1787614053000,9],[1787614352000,9],[1787614652000,9],[1787614952000,9],[1787615287000,9],[1787615591000,8.9],[1787615852000,8.9],[1787616150000,8.9],[1787616514000,8.9],[1787616813000,9],[1787617052000,9],[1787617350000,9],[1787617653000,9],[1787617952000,9],[1787618313000,8.9],[1787618550000,9.2],[1787618853000,9.1],[1787619152000,9.1],[1787619496000,9.1],[1787619750000,9],[1787620070000,9.2],[1787620353000,9.2],[1787620713000,9.2],[1787620950000,9.2],[1787621254000,9.2],[1787621612000,9.2],[1787621853000,9.2],[1787622151000,9.3],[1787622452000,9.3],[1787622752000,9.2],[1787623095000,9.1],[1787623353000,9.2],[1787623713000,9.2],[1787623952000,9.2],[1787624253000,9.2],[1787624552000,9.2],[1787624886000,9.1],[1787625212000,9.3],[1787625514000,9.1],[1787625752000,9.1],[1787626112000,9.2],[1787626391000,9.1],[1787626653000,9.1],[1787626983000,9],[1787627313000,8.8],[1787627552000,9],[1787627912000,8.8],[1787628213000,9],[1787628452000,8.9],[1787628812000,8.8],[1787629053000,8.8],[1787629353000,8.9],[1787629703000,8.7],[1787630014000,9],], 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: [[1787608832000,46.00000000],[1787608954000,46.00000000],[1787609252000,46.00000000],[1787609574000,46.00000000],[1787609852000,46.00000000],[1787610150000,46.00000000],[1787610453000,46.33333333],[1787610775000,46.00000000],[1787611111000,46.00000000],[1787611413000,46.00000000],[1787611654000,46.00000000],[1787612013000,46.00000000],[1787612253000,46.00000000],[1787612553000,46.00000000],[1787612902000,46.00000000],[1787613191000,46.20000000],[1787613495000,46.00000000],[1787613750000,46.00000000],[1787614053000,46.83333333],[1787614352000,47.00000000],[1787614652000,47.80000000],[1787614952000,49.14285714],[1787615287000,50.00000000],[1787615591000,50.00000000],[1787615852000,49.40000000],[1787616150000,49.60000000],[1787616514000,50.00000000],[1787616813000,51.20000000],[1787617052000,51.85714286],[1787617350000,52.00000000],[1787617653000,52.00000000],[1787617952000,51.66666667],[1787618313000,51.00000000],[1787618550000,52.00000000],[1787618853000,52.00000000],[1787619152000,52.00000000],[1787619496000,52.50000000],[1787619750000,52.16666667],[1787620070000,52.40000000],[1787620353000,53.00000000],[1787620713000,53.00000000],[1787620950000,53.00000000],[1787621254000,53.00000000],[1787621612000,53.00000000],[1787621853000,53.16666667],[1787622151000,53.83333333],[1787622452000,54.50000000],[1787622752000,54.83333333],[1787623095000,53.75000000],[1787623353000,53.80000000],[1787623713000,54.33333333],[1787623952000,53.25000000],[1787624253000,53.66666667],[1787624552000,54.00000000],[1787624886000,54.00000000],[1787625212000,54.80000000],[1787625514000,54.33333333],[1787625752000,53.20000000],[1787626112000,54.00000000],[1787626391000,54.00000000],[1787626653000,54.33333333],[1787626983000,53.80000000],[1787627313000,53.00000000],[1787627552000,54.50000000],[1787627912000,53.40000000],[1787628213000,53.60000000],[1787628452000,53.50000000],[1787628812000,53.00000000],[1787629053000,52.83333333],[1787629353000,53.00000000],[1787629703000,52.16666667],[1787630014000,53.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: [[1787608832000,1021.8],[1787608954000,1021.7],[1787609252000,1021.7],[1787609574000,1021.6],[1787609852000,1021.6],[1787610150000,1021.4],[1787610453000,1021.4],[1787610775000,1021.3],[1787611111000,1021.3],[1787611413000,1021.1],[1787611654000,1021.1],[1787612013000,1021.2],[1787612253000,1021.1],[1787612553000,1021.1],[1787612902000,1021],[1787613191000,1020.8],[1787613495000,1020.8],[1787613750000,1020.8],[1787614053000,1020.9],[1787614352000,1020.9],[1787614652000,1020.9],[1787614952000,1021],[1787615287000,1021],[1787615591000,1021],[1787615852000,1020.9],[1787616150000,1020.9],[1787616514000,1020.9],[1787616813000,1021.1],[1787617052000,1021],[1787617350000,1020.9],[1787617653000,1020.9],[1787617952000,1020.7],[1787618313000,1020.6],[1787618550000,1020.5],[1787618853000,1020.6],[1787619152000,1020.5],[1787619496000,1020.5],[1787619750000,1020.5],[1787620070000,1020.4],[1787620353000,1020.5],[1787620713000,1020.4],[1787620950000,1020.3],[1787621254000,1020.3],[1787621612000,1020.3],[1787621853000,1020.3],[1787622151000,1020.4],[1787622452000,1020.4],[1787622752000,1020.5],[1787623095000,1020.3],[1787623353000,1020.4],[1787623713000,1020.3],[1787623952000,1020.1],[1787624253000,1020.1],[1787624552000,1020.1],[1787624886000,1020],[1787625212000,1020],[1787625514000,1020.1],[1787625752000,1019.9],[1787626112000,1020],[1787626391000,1020.1],[1787626653000,1020],[1787626983000,1020],[1787627313000,1020],[1787627552000,1019.9],[1787627912000,1019.7],[1787628213000,1019.7],[1787628452000,1019.7],[1787628812000,1019.5],[1787629053000,1019.4],[1787629353000,1019.4],[1787629703000,1019.7],[1787630014000,1019.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: [[1787608832000,3.120000012],[1787608954000,4.86],[1787609252000,5.297142852],[1787609574000,4.32],[1787609852000,5.339999988],[1787610150000,6.192],[1787610453000,5.22],[1787610775000,6.599999988],[1787611111000,4.77],[1787611413000,3.69],[1787611654000,4.740000012],[1787612013000,5.76],[1787612253000,5.4],[1787612553000,5.472],[1787612902000,6.239999988],[1787613191000,5.184],[1787613495000,7.344],[1787613750000,6.048],[1787614053000,3.660000012],[1787614352000,4.032],[1787614652000,1.512],[1787614952000,3.24],[1787615287000,3.744],[1787615591000,4.799999988],[1787615852000,4.464],[1787616150000,8.64],[1787616514000,3.6],[1787616813000,2.232],[1787617052000,2.88],[1787617350000,4.392],[1787617653000,4.752],[1787617952000,8.579999988],[1787618313000,9.72],[1787618550000,5.04],[1787618853000,5.4],[1787619152000,7.2],[1787619496000,7.2],[1787619750000,8.520000012],[1787620070000,6.768],[1787620353000,6.685714296],[1787620713000,4.536],[1787620950000,7.056],[1787621254000,10.379999988],[1787621612000,9.54],[1787621853000,6.059999988],[1787622151000,3.120000012],[1787622452000,4.560000012],[1787622752000,5.879999988],[1787623095000,7.47],[1787623353000,4.392],[1787623713000,6.720000012],[1787623952000,6.48],[1787624253000,5.640000012],[1787624552000,5.94],[1787624886000,6.57],[1787625212000,5.688],[1787625514000,5.280000012],[1787625752000,5.4],[1787626112000,6.984],[1787626391000,6.48],[1787626653000,5.339999988],[1787626983000,9.432],[1787627313000,13.32],[1787627552000,6.239999988],[1787627912000,8.784],[1787628213000,7.056],[1787628452000,7.440000012],[1787628812000,5.76],[1787629053000,9.659999988],[1787629353000,5.76],[1787629703000,6.959999988],[1787630014000,4.95],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1787608832000,5.04],[1787608954000,6.3],[1787609252000,6.84],[1787609574000,6.552],[1787609852000,6.720000012],[1787610150000,9.144],[1787610453000,5.879999988],[1787610775000,8.46],[1787611111000,7.65],[1787611413000,5.04],[1787611654000,7.139999988],[1787612013000,8.568],[1787612253000,7.128],[1787612553000,6.552],[1787612902000,7.139999988],[1787613191000,7.056],[1787613495000,9.72],[1787613750000,7.056],[1787614053000,5.04],[1787614352000,5.04],[1787614652000,4.032],[1787614952000,5.04],[1787615287000,5.544],[1787615591000,6.720000012],[1787615852000,5.544],[1787616150000,11.232],[1787616514000,6.3],[1787616813000,4.032],[1787617052000,5.04],[1787617350000,6.552],[1787617653000,6.552],[1787617952000,15.360000012],[1787618313000,13.5],[1787618550000,7.56],[1787618853000,8.136],[1787619152000,11.304],[1787619496000,10.26],[1787619750000,10.680000012],[1787620070000,9.144],[1787620353000,9.874285704],[1787620713000,7.056],[1787620950000,9.72],[1787621254000,14.100000012],[1787621612000,13.95],[1787621853000,8.46],[1787622151000,4.619999988],[1787622452000,6.779999988],[1787622752000,8.039999988],[1787623095000,10.08],[1787623353000,6.552],[1787623713000,8.520000012],[1787623952000,9.54],[1787624253000,8.46],[1787624552000,8.1],[1787624886000,8.91],[1787625212000,6.552],[1787625514000,6.720000012],[1787625752000,7.056],[1787626112000,9.576],[1787626391000,7.056],[1787626653000,7.2],[1787626983000,11.232],[1787627313000,15.48],[1787627552000,9.420000012],[1787627912000,12.384],[1787628213000,9.144],[1787628452000,10.199999988],[1787628812000,8.520000012],[1787629053000,13.740000012],[1787629353000,8.91],[1787629703000,8.880000012],[1787630014000,6.3],], 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: [[1787608832000,344.00000000],[1787608954000,91.25000000],[1787609252000,63.28571429],[1787609574000,216.40000000],[1787609852000,75.66666667],[1787610150000,151.80000000],[1787610453000,11.16666667],[1787610775000,176.33333333],[1787611111000,264.00000000],[1787611413000,177.75000000],[1787611654000,76.50000000],[1787612013000,155.60000000],[1787612253000,81.20000000],[1787612553000,88.20000000],[1787612902000,67.66666667],[1787613191000,83.00000000],[1787613495000,151.80000000],[1787613750000,18.80000000],[1787614053000,93.50000000],[1787614352000,104.40000000],[1787614652000,9.00000000],[1787614952000,171.85714286],[1787615287000,125.80000000],[1787615591000,144.33333333],[1787615852000,48.40000000],[1787616150000,35.00000000],[1787616514000,49.25000000],[1787616813000,97.00000000],[1787617052000,202.85714286],[1787617350000,63.40000000],[1787617653000,26.20000000],[1787617952000,26.33333333],[1787618313000,29.75000000],[1787618550000,221.20000000],[1787618853000,165.60000000],[1787619152000,79.80000000],[1787619496000,25.00000000],[1787619750000,45.16666667],[1787620070000,41.00000000],[1787620353000,71.00000000],[1787620713000,257.20000000],[1787620950000,97.40000000],[1787621254000,38.83333333],[1787621612000,116.50000000],[1787621853000,87.16666667],[1787622151000,40.66666667],[1787622452000,104.33333333],[1787622752000,86.16666667],[1787623095000,10.00000000],[1787623353000,45.80000000],[1787623713000,12.00000000],[1787623952000,39.00000000],[1787624253000,33.66666667],[1787624552000,77.83333333],[1787624886000,25.75000000],[1787625212000,31.40000000],[1787625514000,29.00000000],[1787625752000,30.00000000],[1787626112000,96.40000000],[1787626391000,23.40000000],[1787626653000,86.66666667],[1787626983000,38.60000000],[1787627313000,15.00000000],[1787627552000,64.83333333],[1787627912000,35.60000000],[1787628213000,31.20000000],[1787628452000,79.33333333],[1787628812000,38.33333333],[1787629053000,133.83333333],[1787629353000,182.25000000],[1787629703000,38.66666667],[1787630014000,13.25000000],], 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: [[1787608832000,0.00000000],[1787608954000,0.00000000],[1787609252000,0.00000000],[1787609574000,0.00000000],[1787609852000,0.00000000],[1787610150000,0.00000000],[1787610453000,0.00000000],[1787610775000,0.00000000],[1787611111000,0.00000000],[1787611413000,0.00000000],[1787611654000,0.00000000],[1787612013000,0.00000000],[1787612253000,0.00000000],[1787612553000,0.00000000],[1787612902000,0.00000000],[1787613191000,0.00000000],[1787613495000,0.00000000],[1787613750000,0.00000000],[1787614053000,0.00000000],[1787614352000,0.00000000],[1787614652000,0.00000000],[1787614952000,0.00000000],[1787615287000,0.00000000],[1787615591000,0.00000000],[1787615852000,0.00000000],[1787616150000,0.00000000],[1787616514000,0.00000000],[1787616813000,0.00000000],[1787617052000,0.00000000],[1787617350000,0.00000000],[1787617653000,0.00000000],[1787617952000,0.00000000],[1787618313000,0.00000000],[1787618550000,0.00000000],[1787618853000,0.00000000],[1787619152000,0.00000000],[1787619496000,0.00000000],[1787619750000,0.00000000],[1787620070000,0.00000000],[1787620353000,0.00000000],[1787620713000,0.00000000],[1787620950000,0.00000000],[1787621254000,0.00000000],[1787621612000,0.00000000],[1787621853000,0.00000000],[1787622151000,0.00000000],[1787622452000,0.00000000],[1787622752000,0.00000000],[1787623095000,0.00000000],[1787623353000,0.00000000],[1787623713000,0.00000000],[1787623952000,0.00000000],[1787624253000,0.00000000],[1787624552000,0.00000000],[1787624886000,0.00000000],[1787625212000,0.00000000],[1787625514000,0.00000000],[1787625752000,0.00000000],[1787626112000,0.00000000],[1787626391000,0.00000000],[1787626653000,0.00000000],[1787626983000,0.00000000],[1787627313000,0.00000000],[1787627552000,0.00000000],[1787627912000,0.00000000],[1787628213000,0.00000000],[1787628452000,0.00000000],[1787628812000,0.00000000],[1787629053000,0.83333333],[1787629353000,1.00000000],[1787629703000,2.16666667],[1787630014000,3.50000000],], 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: [[1787608832000,0.00000000],[1787608954000,0.00000000],[1787609252000,0.00000000],[1787609574000,0.00000000],[1787609852000,0.00000000],[1787610150000,0.00000000],[1787610453000,0.00000000],[1787610775000,0.00000000],[1787611111000,0.00000000],[1787611413000,0.00000000],[1787611654000,0.00000000],[1787612013000,0.00000000],[1787612253000,0.00000000],[1787612553000,0.00000000],[1787612902000,0.00000000],[1787613191000,0.00000000],[1787613495000,0.00000000],[1787613750000,0.00000000],[1787614053000,0.00000000],[1787614352000,0.00000000],[1787614652000,0.00000000],[1787614952000,0.00000000],[1787615287000,0.00000000],[1787615591000,0.00000000],[1787615852000,0.00000000],[1787616150000,0.00000000],[1787616514000,0.00000000],[1787616813000,0.00000000],[1787617052000,0.00000000],[1787617350000,0.00000000],[1787617653000,0.00000000],[1787617952000,0.00000000],[1787618313000,0.00000000],[1787618550000,0.00000000],[1787618853000,0.00000000],[1787619152000,0.00000000],[1787619496000,0.00000000],[1787619750000,0.00000000],[1787620070000,0.00000000],[1787620353000,0.00000000],[1787620713000,0.00000000],[1787620950000,0.00000000],[1787621254000,0.00000000],[1787621612000,0.00000000],[1787621853000,0.00000000],[1787622151000,0.00000000],[1787622452000,0.00000000],[1787622752000,0.00000000],[1787623095000,0.00000000],[1787623353000,0.00000000],[1787623713000,0.00000000],[1787623952000,0.00000000],[1787624253000,0.00000000],[1787624552000,0.00000000],[1787624886000,0.00000000],[1787625212000,0.00000000],[1787625514000,0.00000000],[1787625752000,0.00000000],[1787626112000,0.00000000],[1787626391000,0.00000000],[1787626653000,0.00000000],[1787626983000,0.00000000],[1787627313000,0.00000000],[1787627552000,0.00000000],[1787627912000,0.00000000],[1787628213000,0.00000000],[1787628452000,0.00000000],[1787628812000,0.00000000],[1787629053000,0.00000000],[1787629353000,0.00000000],[1787629703000,0.00000000],[1787630014000,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: [[1787608832000,0.00000000],[1787608954000,0.00000000],[1787609252000,0.00000000],[1787609574000,0.00000000],[1787609852000,0.00000000],[1787610150000,0.00000000],[1787610453000,0.00000000],[1787610775000,0.00000000],[1787611111000,0.00000000],[1787611413000,0.00000000],[1787611654000,0.00000000],[1787612013000,0.00000000],[1787612253000,0.00000000],[1787612553000,0.00000000],[1787612902000,0.00000000],[1787613191000,0.00000000],[1787613495000,0.00000000],[1787613750000,0.00000000],[1787614053000,0.00000000],[1787614352000,0.00000000],[1787614652000,0.00000000],[1787614952000,0.00000000],[1787615287000,0.00000000],[1787615591000,0.00000000],[1787615852000,0.00000000],[1787616150000,0.00000000],[1787616514000,0.00000000],[1787616813000,0.00000000],[1787617052000,0.00000000],[1787617350000,0.00000000],[1787617653000,0.00000000],[1787617952000,0.00000000],[1787618313000,0.00000000],[1787618550000,0.00000000],[1787618853000,0.00000000],[1787619152000,0.00000000],[1787619496000,0.00000000],[1787619750000,0.00000000],[1787620070000,0.00000000],[1787620353000,0.00000000],[1787620713000,0.00000000],[1787620950000,0.00000000],[1787621254000,0.00000000],[1787621612000,0.00000000],[1787621853000,0.00000000],[1787622151000,0.00000000],[1787622452000,0.00000000],[1787622752000,0.00000000],[1787623095000,0.00000000],[1787623353000,0.00000000],[1787623713000,0.00000000],[1787623952000,0.00000000],[1787624253000,0.00000000],[1787624552000,0.00000000],[1787624886000,0.00000000],[1787625212000,0.00000000],[1787625514000,0.00000000],[1787625752000,0.00000000],[1787626112000,0.00000000],[1787626391000,0.00000000],[1787626653000,0.00000000],[1787626983000,0.00000000],[1787627313000,0.00000000],[1787627552000,0.00000000],[1787627912000,0.00000000],[1787628213000,0.00000000],[1787628452000,0.00000000],[1787628812000,0.00000000],[1787629053000,0.00000000],[1787629353000,0.00000000],[1787629703000,0.00000000],[1787630014000,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; }