var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1610665201000,-2.40000000],[1610665381000,-2.28000000],[1610665690000,-2.18000000],[1610665992000,-2.12500000],[1610666253000,-2.32000000],[1610666581000,-2.38000000],[1610667001000,-2.26666667],[1610667222000,-2.33333333],[1610667481000,-2.40000000],[1610667821000,-2.26666667],[1610668050000,-2.52000000],[1610668382000,-2.88333333],[1610668759000,-2.75000000],[1610668981000,-2.57500000],[1610669281000,-2.15000000],[1610669624000,-2.00000000],[1610669859000,-1.98000000],[1610670155000,-2.26000000],[1610670452000,-2.96000000],[1610670781000,-3.44000000],[1610671081000,-3.78000000],[1610671382000,-4.14000000],[1610671682000,-4.04000000],[1610671981000,-3.82000000],[1610672281000,-3.90000000],[1610672593000,-3.72500000],[1610672865000,-3.68000000],[1610673165000,-3.76000000],[1610673481000,-3.90000000],[1610673781000,-4.16000000],[1610674081000,-4.08000000],[1610674382000,-3.70000000],[1610674681000,-3.52500000],[1610674968000,-3.95000000],[1610675281000,-4.96000000],[1610675581000,-4.84000000],[1610675882000,-4.82000000],[1610676182000,-5.04000000],[1610676481000,-5.08000000],[1610676781000,-5.12000000],[1610677081000,-5.04000000],[1610677381000,-4.94000000],[1610677681000,-5.08000000],[1610677982000,-5.24000000],[1610678281000,-4.80000000],[1610678581000,-4.92000000],[1610678881000,-5.22000000],[1610679182000,-5.04000000],[1610679481000,-5.36000000],[1610679782000,-5.40000000],[1610680082000,-5.06000000],[1610680381000,-4.78000000],[1610680682000,-4.38000000],[1610680981000,-3.96000000],[1610681282000,-3.68000000],[1610681581000,-3.60000000],[1610681881000,-3.70000000],[1610682182000,-3.58000000],[1610682481000,-3.40000000],[1610682781000,-3.04000000],[1610683081000,-2.96000000],[1610683381000,-2.96000000],[1610683681000,-2.82000000],[1610683981000,-2.74000000],[1610684282000,-2.38000000],[1610684581000,-2.22000000],[1610684881000,-2.26000000],[1610685181000,-2.16000000],[1610685482000,-2.12000000],[1610685781000,-2.08000000],[1610686081000,-2.10000000],[1610686382000,-1.84000000],[1610686681000,-1.64000000],[1610686981000,-1.46000000],[1610687282000,-1.38000000],[1610687582000,-1.30000000],[1610687953000,-1.28333333],[1610688181000,-1.25000000],[1610688513000,-1.25000000],[1610688758000,-1.30000000],[1610689155000,-1.25000000],[1610689381000,-1.52500000],[1610689681000,-1.55000000],[1610689981000,-1.46000000],[1610690258000,-1.46666667],[1610690581000,-1.40000000],[1610690881000,-1.34000000],[1610691182000,-1.40000000],[1610691481000,-1.42000000],[1610691810000,-1.40000000],[1610692090000,-1.40000000],[1610692479000,-1.40000000],[1610692682000,-1.42500000],[1610693138000,-1.50000000],[1610693401000,-1.58000000],[1610693582000,-1.63333333],[1610693882000,-1.66000000],[1610694182000,-1.64000000],[1610694481000,-1.86000000],[1610694781000,-1.96000000],[1610695081000,-1.78000000],[1610695381000,-1.70000000],[1610695681000,-1.68000000],[1610695982000,-1.78000000],[1610696281000,-1.68000000],[1610696581000,-1.64000000],[1610696881000,-1.64000000],[1610697190000,-1.60000000],[1610697453000,-1.48000000],[1610697785000,-1.44000000],[1610698107000,-1.41666667],[1610698381000,-1.40000000],[1610698790000,-1.20000000],[1610698981000,-1.26000000],[1610699281000,-1.20000000],[1610699662000,-1.10000000],[1610699859000,-1.17142857],[1610700328000,-1.16000000],[1610700482000,-1.06000000],[1610700781000,-1.00000000],[1610701081000,-1.00000000],[1610701416000,-0.86666667],[1610701681000,-0.76666667],[1610701990000,-0.60000000],[1610702281000,-0.64000000],[1610702581000,-0.60000000],[1610702941000,-0.32500000],[1610703181000,-0.18000000],[1610703481000,0.22000000],[1610703841000,0.23333333],[1610704061000,-0.30000000],[1610704382000,-0.40000000],[1610704681000,-0.28000000],[1610705065000,-0.08000000],[1610705282000,0.04000000],[1610705581000,0.18000000],[1610705882000,0.18000000],[1610706181000,0.18000000],[1610706530000,0.12500000],[1610706753000,0.40000000],[1610707111000,0.16666667],[1610707397000,-0.01666667],[1610707690000,0.13333333],[1610707952000,0.16666667],[1610708264000,0.26666667],[1610708582000,0.16000000],[1610708881000,0.15000000],[1610709164000,0.26666667],[1610709481000,0.20000000],[1610709781000,0.20000000],[1610710082000,0.08000000],[1610710430000,-0.05000000],[1610710724000,-0.03333333],[1610711041000,0.00000000],[1610711280000,0.06666667],[1610711604000,0.12000000],[1610711881000,0.20000000],[1610712196000,0.14000000],[1610712459000,0.06000000],[1610712910000,0.35000000],[1610713099000,0.22000000],[1610713519000,0.18000000],[1610713681000,0.28000000],[1610713981000,0.15000000],[1610714341000,0.10000000],[1610714592000,0.05714286],[1610715004000,0.28000000],[1610715287000,0.14000000],[1610715576000,0.37500000],[1610715753000,0.43333333],[1610716110000,0.60000000],[1610716381000,0.70000000],[1610716681000,0.44000000],[1610717010000,0.36000000],[1610717281000,0.47500000],[1610717612000,0.37500000],[1610717882000,0.45000000],[1610718181000,0.36666667],[1610718495000,0.23333333],[1610718802000,0.02000000],[1610719050000,0.00000000],[1610719426000,0.28000000],[1610719741000,0.00000000],[1610720166000,-0.26666667],[1610720254000,-0.20000000],[1610720602000,-0.38000000],[1610720906000,-0.42500000],[1610721225000,-0.57500000],[1610721524000,-0.75000000],[1610721768000,-0.65000000],[1610722096000,-0.86000000],[1610722381000,-1.00000000],[1610722718000,-1.26000000],[1610722982000,-1.50000000],[1610723290000,-1.80000000],[1610723590000,-1.70000000],[1610723952000,-1.66000000],[1610724227000,-1.76666667],[1610724481000,-1.88000000],[1610724841000,-1.84000000],[1610725081000,-1.80000000],[1610725381000,-1.82500000],[1610725665000,-1.90000000],[1610725964000,-2.02857143],[1610726281000,-2.15000000],[1610726599000,-2.10000000],[1610726903000,-2.11666667],[1610727150000,-2.18333333],[1610727579000,-2.16000000],[1610727782000,-2.16000000],[1610728081000,-2.12000000],[1610728381000,-2.18000000],[1610728682000,-2.20000000],[1610728981000,-2.28000000],[1610729281000,-2.32000000],[1610729581000,-2.36000000],[1610729882000,-2.36000000],[1610730181000,-2.40000000],[1610730481000,-2.54000000],[1610730781000,-2.58000000],[1610731082000,-2.68000000],[1610731381000,-2.76000000],[1610731681000,-2.90000000],[1610731982000,-3.08000000],[1610732281000,-3.22000000],[1610732581000,-3.36000000],[1610732882000,-3.14000000],[1610733181000,-3.14000000],[1610733481000,-3.42000000],[1610733782000,-3.28000000],[1610734081000,-3.50000000],[1610734381000,-3.74000000],[1610734682000,-3.70000000],[1610734981000,-3.60000000],[1610735282000,-3.56000000],[1610735581000,-3.66000000],[1610735881000,-3.64000000],[1610736181000,-3.76000000],[1610736481000,-3.78000000],[1610736781000,-3.84000000],[1610737081000,-3.88000000],[1610737382000,-3.84000000],[1610737681000,-4.06000000],[1610737981000,-3.98000000],[1610738281000,-3.80000000],[1610738582000,-3.86000000],[1610738881000,-3.92000000],[1610739181000,-4.08000000],[1610739482000,-3.94000000],[1610739781000,-3.86000000],[1610740081000,-3.66000000],[1610740381000,-3.62000000],[1610740682000,-3.62000000],[1610740981000,-3.48000000],[1610741281000,-3.90000000],[1610741581000,-4.30000000],[1610741882000,-4.38000000],[1610742181000,-4.40000000],[1610742481000,-4.44000000],[1610742781000,-4.72000000],[1610743082000,-4.72000000],[1610743381000,-5.12000000],[1610743690000,-5.12000000],[1610743981000,-4.96666667],[1610744312000,-5.20000000],[1610744595000,-5.54000000],[1610744925000,-5.26000000],[1610745242000,-5.02000000],[1610745527000,-4.68000000],[1610745802000,-4.30000000],[1610746141000,-4.30000000],[1610746382000,-4.60000000],[1610746681000,-4.05000000],[1610746961000,-3.81428571],[1610747355000,-3.80000000],[1610747582000,-3.62000000],[1610747881000,-3.70000000],[1610748213000,-4.14000000],[1610748481000,-4.16000000],[1610748793000,-3.87500000],[1610749082000,-4.00000000],[1610749381000,-4.17500000],[1610749721000,-4.20000000],[1610749952000,-4.30000000],[1610750281000,-4.32500000],[1610750551000,-4.30000000],[1610750919000,-5.04000000],[1610751181000,-5.32000000],[1610751490000,-5.60000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [], 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); }); $('.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; }