var meteoCharts = {}; var meteoCompassLabels = {0: 'S', 90: 'V', 180: 'J', 270: 'Z', 360: 'S'}; var meteoRangeMin = 1795388400000; var meteoRangeMax = 1795428583000; function meteoFormatTime(ms) { return moment(ms).format('HH:mm'); } function meteoFormatDateTime(ms) { return moment(ms).format('DD.MM., HH:mm'); } function meteoComputeExtremes(points) { var minPoint = null, maxPoint = null; for (var i = 0; i < points.length; i++) { var p = points[i]; if (p.y === null || p.y === undefined) continue; if (!minPoint || p.y < minPoint.y) minPoint = p; if (!maxPoint || p.y > maxPoint.y) maxPoint = p; } return (minPoint || maxPoint) ? {min: minPoint, max: maxPoint} : null; } function meteoExtremeType(extremes, p) { if (!extremes || !p) return null; if (extremes.max && p.x === extremes.max.x && p.y === extremes.max.y) return 'max'; if (extremes.min && p.x === extremes.min.x && p.y === extremes.min.y) return 'min'; return null; } function meteoBuildDataset(spec) { var extremes = spec.highlightExtremes ? meteoComputeExtremes(spec.points) : null; var baseRadius = spec.pointRadius !== undefined ? spec.pointRadius : 0; var baseHoverRadius = baseRadius || 3; return { label: spec.label, data: spec.points, borderColor: spec.color, backgroundColor: spec.color, borderWidth: 2, tension: 0.15, fill: false, spanGaps: true, showLine: spec.showLine !== false, meteoUnit: spec.unit || '', meteoTooltipMode: spec.tooltipMode || 'default', meteoExtremes: extremes, pointRadius: function(context) { return meteoExtremeType(extremes, context.raw) ? Math.max(baseRadius, 5) : baseRadius; }, pointHoverRadius: function(context) { return meteoExtremeType(extremes, context.raw) ? Math.max(baseHoverRadius, 7) : baseHoverRadius; }, pointBackgroundColor: spec.color, pointBorderColor: '#ffffff', pointBorderWidth: function(context) { return meteoExtremeType(extremes, context.raw) ? 2 : 0; } }; } function buildMeteoChart(canvasId, resetButtonId, specs, extraOptions) { var canvas = document.getElementById(canvasId); if (!canvas || typeof Chart === 'undefined' || !specs.length) { return; } extraOptions = extraOptions || {}; var yScale = {title: {display: !!extraOptions.yLabel, text: extraOptions.yLabel || ''}}; if (extraOptions.yMin !== undefined) yScale.min = extraOptions.yMin; if (extraOptions.yMax !== undefined) yScale.max = extraOptions.yMax; if (extraOptions.yMode === 'compass') { yScale.min = 0; yScale.max = 360; yScale.ticks = { stepSize: 90, callback: function(value) { return meteoCompassLabels[value] !== undefined ? meteoCompassLabels[value] : value; } }; } meteoCharts[canvasId] = new Chart(canvas.getContext('2d'), { type: 'line', data: {datasets: specs.map(meteoBuildDataset)}, options: { responsive: true, maintainAspectRatio: false, animation: false, interaction: {mode: 'nearest', axis: 'x', intersect: false}, scales: { x: { type: 'linear', min: meteoRangeMin, max: meteoRangeMax, ticks: {maxTicksLimit: 8, callback: meteoFormatTime} }, y: yScale }, plugins: { legend: {display: true, position: 'top'}, tooltip: { callbacks: { title: function(items) { return items.length ? meteoFormatDateTime(items[0].parsed.x) : ''; }, label: function(context) { var ds = context.dataset; if (ds.meteoTooltipMode === 'windDirection') { return meteo_wind_direction_name(context.parsed.y); } var extremeType = meteoExtremeType(ds.meteoExtremes, context.raw); var suffix = extremeType === 'max' ? ' (dnešné maximum)' : (extremeType === 'min' ? ' (dnešné minimum)' : ''); return ds.label + ': ' + context.parsed.y + ds.meteoUnit + suffix; } } }, zoom: { pan: {enabled: true, mode: 'x'}, zoom: {wheel: {enabled: true}, pinch: {enabled: true}, mode: 'x'}, limits: {x: {min: meteoRangeMin, max: meteoRangeMax}} } } } }); var resetButton = document.getElementById(resetButtonId); if (resetButton) { resetButton.addEventListener('click', function() { meteoCharts[canvasId].resetZoom(); }); } } $(document).ready(function() { buildMeteoChart('chart-temperature-canvas', 'chart-temperature-reset', [{"label":"Teplota (°C)","color":"#d6212a","points":[{"x":1795388400000,"y":1.6},{"x":1795388460000,"y":1.6},{"x":1795388520000,"y":1.6},{"x":1795388580000,"y":1.6},{"x":1795388640000,"y":1.6},{"x":1795388700000,"y":1.6},{"x":1795388760000,"y":1.6},{"x":1795388820000,"y":1.6},{"x":1795388880000,"y":1.6},{"x":1795388940000,"y":1.6},{"x":1795389000000,"y":1.6},{"x":1795389060000,"y":1.6},{"x":1795389120000,"y":1.5},{"x":1795389180000,"y":1.5},{"x":1795389240000,"y":1.5},{"x":1795389300000,"y":1.5},{"x":1795389360000,"y":1.5},{"x":1795389420000,"y":1.5},{"x":1795389480000,"y":1.5},{"x":1795389540000,"y":1.5},{"x":1795389600000,"y":1.5},{"x":1795389660000,"y":1.5},{"x":1795389720000,"y":1.4},{"x":1795389780000,"y":1.4},{"x":1795389840000,"y":1.4},{"x":1795389900000,"y":1.4},{"x":1795389960000,"y":1.3},{"x":1795390020000,"y":1.3},{"x":1795390080000,"y":1.3},{"x":1795390140000,"y":1.2},{"x":1795390200000,"y":1.2},{"x":1795390260000,"y":1.2},{"x":1795390320000,"y":1.2},{"x":1795390380000,"y":1.2},{"x":1795390440000,"y":1.3},{"x":1795390500000,"y":1.3},{"x":1795390560000,"y":1.3},{"x":1795390620000,"y":1.3},{"x":1795390680000,"y":1.3},{"x":1795390740000,"y":1.2},{"x":1795390800000,"y":1.2},{"x":1795390860000,"y":1.3},{"x":1795390920000,"y":1.4},{"x":1795390980000,"y":1.3},{"x":1795391040000,"y":1.3},{"x":1795391100000,"y":1.3},{"x":1795391160000,"y":1.3},{"x":1795391220000,"y":1.3},{"x":1795391280000,"y":1.2},{"x":1795391340000,"y":1.2},{"x":1795391400000,"y":1.2},{"x":1795391460000,"y":1.2},{"x":1795391520000,"y":1.2},{"x":1795391580000,"y":1.2},{"x":1795391640000,"y":1.1},{"x":1795391700000,"y":1.1},{"x":1795391760000,"y":1},{"x":1795391820000,"y":1},{"x":1795391880000,"y":1},{"x":1795391940000,"y":1},{"x":1795392000000,"y":0.9},{"x":1795392060000,"y":0.9},{"x":1795392120000,"y":0.8},{"x":1795392180000,"y":0.9},{"x":1795392240000,"y":0.9},{"x":1795392300000,"y":0.9},{"x":1795392360000,"y":0.8},{"x":1795392420000,"y":0.9},{"x":1795392480000,"y":0.9},{"x":1795392540000,"y":0.9},{"x":1795392600000,"y":0.9},{"x":1795392660000,"y":0.9},{"x":1795392720000,"y":0.9},{"x":1795392780000,"y":0.9},{"x":1795392840000,"y":1},{"x":1795392900000,"y":0.9},{"x":1795392960000,"y":1},{"x":1795393020000,"y":0.9},{"x":1795393080000,"y":0.9},{"x":1795393140000,"y":1},{"x":1795393200000,"y":0.9},{"x":1795393260000,"y":1},{"x":1795393320000,"y":0.9},{"x":1795393380000,"y":0.9},{"x":1795393440000,"y":1},{"x":1795393500000,"y":0.9},{"x":1795393560000,"y":0.9},{"x":1795393620000,"y":1},{"x":1795393680000,"y":1},{"x":1795393740000,"y":1},{"x":1795393800000,"y":0.9},{"x":1795393860000,"y":0.9},{"x":1795393920000,"y":0.9},{"x":1795393980000,"y":1},{"x":1795394040000,"y":1},{"x":1795394100000,"y":0.9},{"x":1795394160000,"y":0.9},{"x":1795394220000,"y":1},{"x":1795394280000,"y":1},{"x":1795394340000,"y":1},{"x":1795394400000,"y":1},{"x":1795394460000,"y":0.9},{"x":1795394520000,"y":0.9},{"x":1795394580000,"y":0.8},{"x":1795394640000,"y":0.8},{"x":1795394700000,"y":0.9},{"x":1795394760000,"y":0.9},{"x":1795394820000,"y":0.9},{"x":1795394880000,"y":1},{"x":1795394940000,"y":1},{"x":1795395000000,"y":1},{"x":1795395060000,"y":1},{"x":1795395120000,"y":1},{"x":1795395180000,"y":1},{"x":1795395240000,"y":1},{"x":1795395300000,"y":1},{"x":1795395360000,"y":1},{"x":1795395420000,"y":1},{"x":1795395480000,"y":1.1},{"x":1795395540000,"y":1},{"x":1795395600000,"y":1},{"x":1795395660000,"y":0.9},{"x":1795395720000,"y":1},{"x":1795395780000,"y":0.9},{"x":1795395840000,"y":1},{"x":1795395900000,"y":0.9},{"x":1795395960000,"y":0.9},{"x":1795396020000,"y":0.9},{"x":1795396080000,"y":0.9},{"x":1795396140000,"y":0.9},{"x":1795396200000,"y":0.8},{"x":1795396260000,"y":0.9},{"x":1795396320000,"y":0.8},{"x":1795396380000,"y":0.8},{"x":1795396440000,"y":0.9},{"x":1795396500000,"y":0.9},{"x":1795396560000,"y":0.8},{"x":1795396620000,"y":0.7},{"x":1795396680000,"y":0.7},{"x":1795396740000,"y":0.8},{"x":1795396800000,"y":0.9},{"x":1795396860000,"y":0.8},{"x":1795396920000,"y":0.9},{"x":1795396980000,"y":0.8},{"x":1795397040000,"y":0.8},{"x":1795397100000,"y":0.8},{"x":1795397160000,"y":0.8},{"x":1795397220000,"y":0.9},{"x":1795397280000,"y":0.9},{"x":1795397340000,"y":1},{"x":1795397400000,"y":0.9},{"x":1795397460000,"y":0.8},{"x":1795397520000,"y":0.8},{"x":1795397580000,"y":0.8},{"x":1795397640000,"y":0.9},{"x":1795397700000,"y":0.8},{"x":1795397760000,"y":0.9},{"x":1795397820000,"y":0.9},{"x":1795397880000,"y":0.8},{"x":1795397940000,"y":0.8},{"x":1795398000000,"y":0.9},{"x":1795398060000,"y":0.9},{"x":1795398120000,"y":0.9},{"x":1795398180000,"y":0.8},{"x":1795398240000,"y":0.9},{"x":1795398300000,"y":0.9},{"x":1795398360000,"y":0.9},{"x":1795398420000,"y":0.9},{"x":1795398480000,"y":0.9},{"x":1795398540000,"y":0.9},{"x":1795398600000,"y":0.9},{"x":1795398660000,"y":0.8},{"x":1795398720000,"y":0.8},{"x":1795398780000,"y":0.8},{"x":1795398840000,"y":0.9},{"x":1795398900000,"y":0.8},{"x":1795398960000,"y":0.8},{"x":1795399020000,"y":0.7},{"x":1795399080000,"y":0.7},{"x":1795399140000,"y":0.7},{"x":1795399200000,"y":0.6},{"x":1795399260000,"y":0.7},{"x":1795399320000,"y":0.7},{"x":1795399380000,"y":0.7},{"x":1795399440000,"y":0.8},{"x":1795399500000,"y":0.8},{"x":1795399560000,"y":0.7},{"x":1795399620000,"y":0.7},{"x":1795399680000,"y":0.6},{"x":1795399740000,"y":0.6},{"x":1795399800000,"y":0.6},{"x":1795399860000,"y":0.7},{"x":1795399920000,"y":0.6},{"x":1795399980000,"y":0.6},{"x":1795400040000,"y":0.6},{"x":1795400100000,"y":0.6},{"x":1795400160000,"y":0.6},{"x":1795400220000,"y":0.6},{"x":1795400280000,"y":0.6},{"x":1795400340000,"y":0.6},{"x":1795400400000,"y":0.6},{"x":1795400640000,"y":0.6},{"x":1795400700000,"y":0.6},{"x":1795400760000,"y":0.5},{"x":1795400820000,"y":0.6},{"x":1795400880000,"y":0.5},{"x":1795400940000,"y":0.5},{"x":1795401000000,"y":0.6},{"x":1795401060000,"y":0.6},{"x":1795401120000,"y":0.6},{"x":1795401180000,"y":0.6},{"x":1795401240000,"y":0.6},{"x":1795401300000,"y":0.7},{"x":1795401360000,"y":0.6},{"x":1795401420000,"y":0.6},{"x":1795401480000,"y":0.7},{"x":1795401540000,"y":0.7},{"x":1795401600000,"y":0.7},{"x":1795401660000,"y":0.7},{"x":1795401720000,"y":0.7},{"x":1795401780000,"y":0.7},{"x":1795401840000,"y":0.7},{"x":1795401900000,"y":0.7},{"x":1795401960000,"y":0.7},{"x":1795402020000,"y":0.7},{"x":1795402080000,"y":0.7},{"x":1795402140000,"y":0.7},{"x":1795402200000,"y":0.7},{"x":1795402260000,"y":0.7},{"x":1795402320000,"y":0.7},{"x":1795402380000,"y":0.7},{"x":1795402440000,"y":0.8},{"x":1795402500000,"y":0.9},{"x":1795402560000,"y":0.8},{"x":1795402620000,"y":0.8},{"x":1795402680000,"y":0.8},{"x":1795402740000,"y":0.8},{"x":1795402800000,"y":0.9},{"x":1795402860000,"y":0.9},{"x":1795402920000,"y":0.8},{"x":1795402980000,"y":0.8},{"x":1795403040000,"y":0.8},{"x":1795403100000,"y":0.8},{"x":1795403160000,"y":0.8},{"x":1795403220000,"y":0.7},{"x":1795403280000,"y":0.7},{"x":1795403340000,"y":0.7},{"x":1795403400000,"y":0.7},{"x":1795403460000,"y":0.8},{"x":1795403520000,"y":0.8},{"x":1795403580000,"y":0.8},{"x":1795403640000,"y":0.8},{"x":1795403700000,"y":0.8},{"x":1795403760000,"y":0.7},{"x":1795403820000,"y":0.7},{"x":1795403880000,"y":0.7},{"x":1795403940000,"y":0.6},{"x":1795404000000,"y":0.7},{"x":1795404060000,"y":0.7},{"x":1795404120000,"y":0.6},{"x":1795404180000,"y":0.7},{"x":1795404240000,"y":0.6},{"x":1795404300000,"y":0.6},{"x":1795404360000,"y":0.6},{"x":1795404420000,"y":0.6},{"x":1795404480000,"y":0.6},{"x":1795404540000,"y":0.6},{"x":1795404600000,"y":0.6},{"x":1795404660000,"y":0.6},{"x":1795404720000,"y":0.5},{"x":1795404780000,"y":0.6},{"x":1795404840000,"y":0.6},{"x":1795404900000,"y":0.6},{"x":1795404960000,"y":0.5},{"x":1795405020000,"y":0.6},{"x":1795405080000,"y":0.6},{"x":1795405140000,"y":0.6},{"x":1795405200000,"y":0.6},{"x":1795405260000,"y":0.6},{"x":1795405320000,"y":0.6},{"x":1795405380000,"y":0.6},{"x":1795405440000,"y":0.6},{"x":1795405500000,"y":0.6},{"x":1795405560000,"y":0.5},{"x":1795405680000,"y":0.5},{"x":1795405740000,"y":0.5},{"x":1795405800000,"y":0.5},{"x":1795405860000,"y":0.6},{"x":1795405920000,"y":0.6},{"x":1795405980000,"y":0.6},{"x":1795406040000,"y":0.6},{"x":1795406100000,"y":0.6},{"x":1795406160000,"y":0.6},{"x":1795406220000,"y":0.5},{"x":1795406280000,"y":0.6},{"x":1795406340000,"y":0.6},{"x":1795406400000,"y":0.7},{"x":1795406460000,"y":0.7},{"x":1795406520000,"y":0.7},{"x":1795406580000,"y":0.8},{"x":1795406640000,"y":0.8},{"x":1795406700000,"y":0.9},{"x":1795406760000,"y":0.9},{"x":1795406820000,"y":0.9},{"x":1795406880000,"y":0.8},{"x":1795406940000,"y":0.7},{"x":1795407000000,"y":0.7},{"x":1795407060000,"y":0.7},{"x":1795407120000,"y":0.7},{"x":1795407180000,"y":0.7},{"x":1795407240000,"y":0.6},{"x":1795407300000,"y":0.5},{"x":1795407360000,"y":0.5},{"x":1795407420000,"y":0.6},{"x":1795407480000,"y":0.5},{"x":1795407540000,"y":0.5},{"x":1795407600000,"y":0.5},{"x":1795407660000,"y":0.5},{"x":1795407720000,"y":0.5},{"x":1795407780000,"y":0.4},{"x":1795407840000,"y":0.3},{"x":1795407900000,"y":0.5},{"x":1795407960000,"y":0.5},{"x":1795408020000,"y":0.6},{"x":1795408080000,"y":0.6},{"x":1795408140000,"y":0.6},{"x":1795408200000,"y":0.6},{"x":1795408260000,"y":0.7},{"x":1795408320000,"y":0.7},{"x":1795408380000,"y":0.7},{"x":1795408440000,"y":0.7},{"x":1795408500000,"y":0.8},{"x":1795408560000,"y":0.8},{"x":1795408620000,"y":0.8},{"x":1795408680000,"y":0.8},{"x":1795408740000,"y":0.8},{"x":1795408800000,"y":0.8},{"x":1795408860000,"y":0.8},{"x":1795408920000,"y":0.8},{"x":1795408980000,"y":0.8},{"x":1795409040000,"y":0.7},{"x":1795409100000,"y":0.7},{"x":1795409160000,"y":0.6},{"x":1795409220000,"y":0.5},{"x":1795409280000,"y":0.3},{"x":1795409340000,"y":0.2},{"x":1795409400000,"y":0.2},{"x":1795409460000,"y":0.1},{"x":1795409520000,"y":0.1},{"x":1795409580000,"y":0.1},{"x":1795409640000,"y":0},{"x":1795409700000,"y":0.1},{"x":1795409760000,"y":0.3},{"x":1795409820000,"y":0.3},{"x":1795409880000,"y":0.4},{"x":1795409940000,"y":0.3},{"x":1795410000000,"y":0.2},{"x":1795410060000,"y":0.2},{"x":1795410120000,"y":0.1},{"x":1795410180000,"y":0},{"x":1795410240000,"y":0.1},{"x":1795410300000,"y":0.1},{"x":1795410360000,"y":0.1},{"x":1795410420000,"y":0.2},{"x":1795410480000,"y":0.2},{"x":1795410540000,"y":0.2},{"x":1795410600000,"y":0.2},{"x":1795410660000,"y":0.2},{"x":1795410720000,"y":0.2},{"x":1795410780000,"y":0.3},{"x":1795410840000,"y":0.2},{"x":1795410900000,"y":0.3},{"x":1795410960000,"y":0.4},{"x":1795411020000,"y":0.3},{"x":1795411080000,"y":0.3},{"x":1795411140000,"y":0.3},{"x":1795411200000,"y":0.3},{"x":1795411260000,"y":0.3},{"x":1795411320000,"y":0.3},{"x":1795411380000,"y":0.3},{"x":1795411440000,"y":0.4},{"x":1795411500000,"y":0.3},{"x":1795411560000,"y":0.3},{"x":1795411620000,"y":0.4},{"x":1795411680000,"y":0.5},{"x":1795411740000,"y":0.4},{"x":1795411800000,"y":0.5},{"x":1795411860000,"y":0.4},{"x":1795411920000,"y":0.5},{"x":1795411980000,"y":0.6},{"x":1795412040000,"y":0.6},{"x":1795412100000,"y":0.4},{"x":1795412160000,"y":0.4},{"x":1795412220000,"y":0.4},{"x":1795412280000,"y":0.4},{"x":1795412340000,"y":0.4},{"x":1795412400000,"y":0.4},{"x":1795412460000,"y":0.4},{"x":1795412520000,"y":0.4},{"x":1795412580000,"y":0.3},{"x":1795412640000,"y":0.4},{"x":1795412700000,"y":0.5},{"x":1795412760000,"y":0.4},{"x":1795412820000,"y":0.6},{"x":1795412880000,"y":0.6},{"x":1795412940000,"y":0.6},{"x":1795413000000,"y":0.5},{"x":1795413060000,"y":0.5},{"x":1795413120000,"y":0.5},{"x":1795413180000,"y":0.4},{"x":1795413240000,"y":0.4},{"x":1795413300000,"y":0.5},{"x":1795413360000,"y":0.5},{"x":1795413420000,"y":0.6},{"x":1795413480000,"y":0.6},{"x":1795413540000,"y":0.5},{"x":1795413600000,"y":0.6},{"x":1795413660000,"y":0.6},{"x":1795413720000,"y":0.7},{"x":1795413780000,"y":0.7},{"x":1795413840000,"y":0.7},{"x":1795413900000,"y":0.7},{"x":1795413960000,"y":0.8},{"x":1795414020000,"y":0.8},{"x":1795414080000,"y":0.8},{"x":1795414140000,"y":0.8},{"x":1795414200000,"y":0.8},{"x":1795414260000,"y":0.9},{"x":1795414320000,"y":0.9},{"x":1795414380000,"y":1},{"x":1795414440000,"y":1},{"x":1795414500000,"y":1},{"x":1795414560000,"y":1},{"x":1795414620000,"y":1},{"x":1795414680000,"y":1},{"x":1795414740000,"y":1.1},{"x":1795414800000,"y":1.1},{"x":1795414860000,"y":1.1},{"x":1795414920000,"y":1},{"x":1795414980000,"y":1.1},{"x":1795415040000,"y":1.1},{"x":1795415100000,"y":1.1},{"x":1795415160000,"y":1.1},{"x":1795415220000,"y":1.1},{"x":1795415280000,"y":1.1},{"x":1795415340000,"y":1.1},{"x":1795415400000,"y":1.2},{"x":1795415460000,"y":1.2},{"x":1795415520000,"y":1.2},{"x":1795415580000,"y":1.3},{"x":1795415640000,"y":1.4},{"x":1795415700000,"y":1.4},{"x":1795415760000,"y":1.5},{"x":1795415820000,"y":1.5},{"x":1795415880000,"y":1.5},{"x":1795415940000,"y":1.6},{"x":1795416000000,"y":1.6},{"x":1795416060000,"y":1.6},{"x":1795416120000,"y":1.7},{"x":1795416180000,"y":1.7},{"x":1795416240000,"y":1.6},{"x":1795416300000,"y":1.7},{"x":1795416360000,"y":1.7},{"x":1795416420000,"y":1.7},{"x":1795416480000,"y":1.7},{"x":1795416540000,"y":1.7},{"x":1795416600000,"y":1.8},{"x":1795416660000,"y":1.8},{"x":1795416720000,"y":1.9},{"x":1795416780000,"y":1.9},{"x":1795416840000,"y":2},{"x":1795416900000,"y":2},{"x":1795416960000,"y":2},{"x":1795417020000,"y":2},{"x":1795417080000,"y":2.1},{"x":1795417140000,"y":2.1},{"x":1795417200000,"y":2.1},{"x":1795417260000,"y":2},{"x":1795417320000,"y":2},{"x":1795417380000,"y":2.1},{"x":1795417440000,"y":2.2},{"x":1795417500000,"y":2.2},{"x":1795417560000,"y":2.2},{"x":1795417620000,"y":2.2},{"x":1795417680000,"y":2.3},{"x":1795417740000,"y":2.3},{"x":1795417800000,"y":2.4},{"x":1795417860000,"y":2.4},{"x":1795417920000,"y":2.4},{"x":1795417980000,"y":2.5},{"x":1795418040000,"y":2.5},{"x":1795418100000,"y":2.5},{"x":1795418160000,"y":2.6},{"x":1795418220000,"y":2.6},{"x":1795418280000,"y":2.6},{"x":1795418340000,"y":2.7},{"x":1795418400000,"y":2.7},{"x":1795418460000,"y":2.7},{"x":1795418520000,"y":2.8},{"x":1795418580000,"y":2.8},{"x":1795418640000,"y":2.9},{"x":1795418700000,"y":2.9},{"x":1795418760000,"y":2.9},{"x":1795418820000,"y":2.9},{"x":1795418880000,"y":2.9},{"x":1795418940000,"y":3},{"x":1795419000000,"y":3},{"x":1795419060000,"y":3.1},{"x":1795419120000,"y":3.1},{"x":1795419180000,"y":3.2},{"x":1795419240000,"y":3.2},{"x":1795419300000,"y":3.3},{"x":1795419360000,"y":3.3},{"x":1795419420000,"y":3.3},{"x":1795419480000,"y":3.5},{"x":1795419540000,"y":3.5},{"x":1795419600000,"y":3.6},{"x":1795419660000,"y":3.6},{"x":1795419720000,"y":3.7},{"x":1795419780000,"y":3.8},{"x":1795419840000,"y":3.8},{"x":1795419900000,"y":3.8},{"x":1795419960000,"y":3.7},{"x":1795420020000,"y":3.8},{"x":1795420080000,"y":3.8},{"x":1795420200000,"y":3.9},{"x":1795420260000,"y":4},{"x":1795420320000,"y":4.1},{"x":1795420380000,"y":3.9},{"x":1795420440000,"y":3.9},{"x":1795420500000,"y":4},{"x":1795420560000,"y":4},{"x":1795420620000,"y":4.1},{"x":1795420680000,"y":4},{"x":1795420740000,"y":4.1},{"x":1795420800000,"y":4.1},{"x":1795420860000,"y":4},{"x":1795420920000,"y":4},{"x":1795420980000,"y":4},{"x":1795421040000,"y":4.1},{"x":1795421100000,"y":4.1},{"x":1795421160000,"y":4.1},{"x":1795421220000,"y":4.1},{"x":1795421280000,"y":4.1},{"x":1795421340000,"y":4.1},{"x":1795421400000,"y":4.2},{"x":1795421460000,"y":4.4},{"x":1795421520000,"y":4.4},{"x":1795421580000,"y":4.2},{"x":1795421640000,"y":4.2},{"x":1795421700000,"y":4.5},{"x":1795421760000,"y":4.3},{"x":1795421820000,"y":4.2},{"x":1795421880000,"y":4.2},{"x":1795421940000,"y":4.2},{"x":1795422000000,"y":4.3},{"x":1795422060000,"y":4.3},{"x":1795422120000,"y":4.3},{"x":1795422180000,"y":4.3},{"x":1795422240000,"y":4.3},{"x":1795422300000,"y":4.4},{"x":1795422360000,"y":4.5},{"x":1795422420000,"y":4.4},{"x":1795422480000,"y":4.3},{"x":1795422540000,"y":4.1},{"x":1795422600000,"y":4},{"x":1795422660000,"y":3.9},{"x":1795422720000,"y":3.8},{"x":1795422780000,"y":4},{"x":1795422840000,"y":4.1},{"x":1795422900000,"y":4.3},{"x":1795422960000,"y":4.3},{"x":1795423020000,"y":4.3},{"x":1795423080000,"y":4.1},{"x":1795423140000,"y":4.1},{"x":1795423200000,"y":4.3},{"x":1795423260000,"y":4.3},{"x":1795423320000,"y":4.4},{"x":1795423380000,"y":4.3},{"x":1795423440000,"y":4.4},{"x":1795423500000,"y":4.5},{"x":1795423560000,"y":4.5},{"x":1795423620000,"y":4.4},{"x":1795423680000,"y":4.4},{"x":1795423740000,"y":4.5},{"x":1795423800000,"y":4.6},{"x":1795423860000,"y":4.5},{"x":1795423920000,"y":4.5},{"x":1795423980000,"y":4.5},{"x":1795424040000,"y":4.5},{"x":1795424100000,"y":4.6},{"x":1795424160000,"y":4.6},{"x":1795424220000,"y":4.4},{"x":1795424280000,"y":4.5},{"x":1795424340000,"y":4.2},{"x":1795424400000,"y":4.1},{"x":1795424460000,"y":4.2},{"x":1795424520000,"y":4.4},{"x":1795424580000,"y":4.5}],"highlightExtremes":true,"unit":" °C"},{"label":"Rosný bod (°C)","color":"#5b9f4a","points":[],"highlightExtremes":false,"unit":" °C"}], {"yLabel":"\u00b0C"}); }); $(document).ready(function() { buildMeteoChart('chart-rain-canvas', 'chart-rain-reset', [{"label":"Zrážky (mm)","color":"#008fbf","points":[{"x":1795388400000,"y":0},{"x":1795388460000,"y":0},{"x":1795388520000,"y":0},{"x":1795388580000,"y":0},{"x":1795388640000,"y":0},{"x":1795388700000,"y":0},{"x":1795388760000,"y":0},{"x":1795388820000,"y":0},{"x":1795388880000,"y":0},{"x":1795388940000,"y":0},{"x":1795389000000,"y":0},{"x":1795389060000,"y":0},{"x":1795389120000,"y":0},{"x":1795389180000,"y":0},{"x":1795389240000,"y":0},{"x":1795389300000,"y":0},{"x":1795389360000,"y":0},{"x":1795389420000,"y":0},{"x":1795389480000,"y":0},{"x":1795389540000,"y":0},{"x":1795389600000,"y":0},{"x":1795389660000,"y":0},{"x":1795389720000,"y":0},{"x":1795389780000,"y":0},{"x":1795389840000,"y":0},{"x":1795389900000,"y":0},{"x":1795389960000,"y":0},{"x":1795390020000,"y":0},{"x":1795390080000,"y":0},{"x":1795390140000,"y":0},{"x":1795390200000,"y":0},{"x":1795390260000,"y":0},{"x":1795390320000,"y":0},{"x":1795390380000,"y":0},{"x":1795390440000,"y":0},{"x":1795390500000,"y":0},{"x":1795390560000,"y":0},{"x":1795390620000,"y":0},{"x":1795390680000,"y":0},{"x":1795390740000,"y":0},{"x":1795390800000,"y":0},{"x":1795390860000,"y":0},{"x":1795390920000,"y":0},{"x":1795390980000,"y":0},{"x":1795391040000,"y":0},{"x":1795391100000,"y":0},{"x":1795391160000,"y":0},{"x":1795391220000,"y":0},{"x":1795391280000,"y":0},{"x":1795391340000,"y":0},{"x":1795391400000,"y":0},{"x":1795391460000,"y":0},{"x":1795391520000,"y":0},{"x":1795391580000,"y":0},{"x":1795391640000,"y":0},{"x":1795391700000,"y":0},{"x":1795391760000,"y":0},{"x":1795391820000,"y":0},{"x":1795391880000,"y":0},{"x":1795391940000,"y":0},{"x":1795392000000,"y":0},{"x":1795392060000,"y":0},{"x":1795392120000,"y":0},{"x":1795392180000,"y":0},{"x":1795392240000,"y":0},{"x":1795392300000,"y":0},{"x":1795392360000,"y":0},{"x":1795392420000,"y":0},{"x":1795392480000,"y":0},{"x":1795392540000,"y":0},{"x":1795392600000,"y":0},{"x":1795392660000,"y":0},{"x":1795392720000,"y":0},{"x":1795392780000,"y":0},{"x":1795392840000,"y":0},{"x":1795392900000,"y":0},{"x":1795392960000,"y":0},{"x":1795393020000,"y":0},{"x":1795393080000,"y":0},{"x":1795393140000,"y":0},{"x":1795393200000,"y":0},{"x":1795393260000,"y":0},{"x":1795393320000,"y":0},{"x":1795393380000,"y":0},{"x":1795393440000,"y":0},{"x":1795393500000,"y":0},{"x":1795393560000,"y":0},{"x":1795393620000,"y":0},{"x":1795393680000,"y":0},{"x":1795393740000,"y":0},{"x":1795393800000,"y":0},{"x":1795393860000,"y":0},{"x":1795393920000,"y":0},{"x":1795393980000,"y":0},{"x":1795394040000,"y":0},{"x":1795394100000,"y":0},{"x":1795394160000,"y":0},{"x":1795394220000,"y":0},{"x":1795394280000,"y":0},{"x":1795394340000,"y":0},{"x":1795394400000,"y":0},{"x":1795394460000,"y":0},{"x":1795394520000,"y":0},{"x":1795394580000,"y":0},{"x":1795394640000,"y":0},{"x":1795394700000,"y":0},{"x":1795394760000,"y":0},{"x":1795394820000,"y":0},{"x":1795394880000,"y":0},{"x":1795394940000,"y":0},{"x":1795395000000,"y":0},{"x":1795395060000,"y":0},{"x":1795395120000,"y":0},{"x":1795395180000,"y":0},{"x":1795395240000,"y":0},{"x":1795395300000,"y":0},{"x":1795395360000,"y":0},{"x":1795395420000,"y":0},{"x":1795395480000,"y":0},{"x":1795395540000,"y":0},{"x":1795395600000,"y":0},{"x":1795395660000,"y":0},{"x":1795395720000,"y":0},{"x":1795395780000,"y":0},{"x":1795395840000,"y":0},{"x":1795395900000,"y":0},{"x":1795395960000,"y":0},{"x":1795396020000,"y":0},{"x":1795396080000,"y":0},{"x":1795396140000,"y":0},{"x":1795396200000,"y":0},{"x":1795396260000,"y":0},{"x":1795396320000,"y":0},{"x":1795396380000,"y":0},{"x":1795396440000,"y":0},{"x":1795396500000,"y":0},{"x":1795396560000,"y":0},{"x":1795396620000,"y":0},{"x":1795396680000,"y":0},{"x":1795396740000,"y":0},{"x":1795396800000,"y":0},{"x":1795396860000,"y":0},{"x":1795396920000,"y":0},{"x":1795396980000,"y":0},{"x":1795397040000,"y":0},{"x":1795397100000,"y":0},{"x":1795397160000,"y":0},{"x":1795397220000,"y":0},{"x":1795397280000,"y":0},{"x":1795397340000,"y":0},{"x":1795397400000,"y":0},{"x":1795397460000,"y":0},{"x":1795397520000,"y":0},{"x":1795397580000,"y":0},{"x":1795397640000,"y":0},{"x":1795397700000,"y":0},{"x":1795397760000,"y":0},{"x":1795397820000,"y":0},{"x":1795397880000,"y":0},{"x":1795397940000,"y":0},{"x":1795398000000,"y":0},{"x":1795398060000,"y":0},{"x":1795398120000,"y":0},{"x":1795398180000,"y":0},{"x":1795398240000,"y":0},{"x":1795398300000,"y":0},{"x":1795398360000,"y":0},{"x":1795398420000,"y":0},{"x":1795398480000,"y":0},{"x":1795398540000,"y":0},{"x":1795398600000,"y":0},{"x":1795398660000,"y":0},{"x":1795398720000,"y":0},{"x":1795398780000,"y":0},{"x":1795398840000,"y":0},{"x":1795398900000,"y":0},{"x":1795398960000,"y":0},{"x":1795399020000,"y":0},{"x":1795399080000,"y":0},{"x":1795399140000,"y":0},{"x":1795399200000,"y":0},{"x":1795399260000,"y":0},{"x":1795399320000,"y":0},{"x":1795399380000,"y":0},{"x":1795399440000,"y":0},{"x":1795399500000,"y":0},{"x":1795399560000,"y":0},{"x":1795399620000,"y":0},{"x":1795399680000,"y":0},{"x":1795399740000,"y":0},{"x":1795399800000,"y":0},{"x":1795399860000,"y":0},{"x":1795399920000,"y":0},{"x":1795399980000,"y":0},{"x":1795400040000,"y":0},{"x":1795400100000,"y":0},{"x":1795400160000,"y":0},{"x":1795400220000,"y":0},{"x":1795400280000,"y":0},{"x":1795400340000,"y":0},{"x":1795400460000,"y":0},{"x":1795400520000,"y":0},{"x":1795400580000,"y":0},{"x":1795400640000,"y":0},{"x":1795400700000,"y":0},{"x":1795400760000,"y":0},{"x":1795400820000,"y":0},{"x":1795400880000,"y":0},{"x":1795400940000,"y":0},{"x":1795401000000,"y":0},{"x":1795401060000,"y":0},{"x":1795401120000,"y":0},{"x":1795401180000,"y":0},{"x":1795401240000,"y":0},{"x":1795401300000,"y":0},{"x":1795401360000,"y":0},{"x":1795401420000,"y":0},{"x":1795401480000,"y":0},{"x":1795401540000,"y":0},{"x":1795401600000,"y":0},{"x":1795401660000,"y":0},{"x":1795401720000,"y":0},{"x":1795401780000,"y":0},{"x":1795401840000,"y":0},{"x":1795401900000,"y":0},{"x":1795401960000,"y":0},{"x":1795402020000,"y":0},{"x":1795402080000,"y":0},{"x":1795402140000,"y":0},{"x":1795402200000,"y":0},{"x":1795402260000,"y":0},{"x":1795402320000,"y":0},{"x":1795402380000,"y":0},{"x":1795402440000,"y":0},{"x":1795402500000,"y":0},{"x":1795402560000,"y":0},{"x":1795402620000,"y":0},{"x":1795402680000,"y":0},{"x":1795402740000,"y":0},{"x":1795402800000,"y":0},{"x":1795402860000,"y":0},{"x":1795402920000,"y":0},{"x":1795402980000,"y":0},{"x":1795403040000,"y":0},{"x":1795403100000,"y":0},{"x":1795403160000,"y":0},{"x":1795403220000,"y":0},{"x":1795403280000,"y":0},{"x":1795403340000,"y":0},{"x":1795403400000,"y":0},{"x":1795403460000,"y":0},{"x":1795403520000,"y":0},{"x":1795403580000,"y":0},{"x":1795403640000,"y":0},{"x":1795403700000,"y":0},{"x":1795403760000,"y":0},{"x":1795403820000,"y":0},{"x":1795403880000,"y":0},{"x":1795403940000,"y":0},{"x":1795404000000,"y":0},{"x":1795404060000,"y":0},{"x":1795404120000,"y":0},{"x":1795404180000,"y":0},{"x":1795404240000,"y":0},{"x":1795404300000,"y":0},{"x":1795404360000,"y":0},{"x":1795404420000,"y":0},{"x":1795404480000,"y":0},{"x":1795404540000,"y":0},{"x":1795404600000,"y":0},{"x":1795404660000,"y":0},{"x":1795404720000,"y":0},{"x":1795404780000,"y":0},{"x":1795404840000,"y":0},{"x":1795404900000,"y":0},{"x":1795404960000,"y":0},{"x":1795405020000,"y":0},{"x":1795405080000,"y":0},{"x":1795405140000,"y":0},{"x":1795405200000,"y":0},{"x":1795405260000,"y":0},{"x":1795405320000,"y":0},{"x":1795405380000,"y":0},{"x":1795405440000,"y":0},{"x":1795405500000,"y":0},{"x":1795405560000,"y":0},{"x":1795405680000,"y":0},{"x":1795405740000,"y":0},{"x":1795405800000,"y":0},{"x":1795405860000,"y":0},{"x":1795405920000,"y":0},{"x":1795405980000,"y":0},{"x":1795406040000,"y":0},{"x":1795406100000,"y":0},{"x":1795406160000,"y":0},{"x":1795406220000,"y":0},{"x":1795406280000,"y":0},{"x":1795406340000,"y":0},{"x":1795406400000,"y":0},{"x":1795406460000,"y":0},{"x":1795406520000,"y":0},{"x":1795406580000,"y":0},{"x":1795406640000,"y":0},{"x":1795406700000,"y":0},{"x":1795406760000,"y":0},{"x":1795406820000,"y":0},{"x":1795406880000,"y":0},{"x":1795406940000,"y":0},{"x":1795407000000,"y":0},{"x":1795407060000,"y":0},{"x":1795407120000,"y":0},{"x":1795407180000,"y":0},{"x":1795407240000,"y":0},{"x":1795407300000,"y":0},{"x":1795407360000,"y":0},{"x":1795407420000,"y":0},{"x":1795407480000,"y":0},{"x":1795407540000,"y":0},{"x":1795407600000,"y":0},{"x":1795407660000,"y":0},{"x":1795407720000,"y":0},{"x":1795407780000,"y":0},{"x":1795407840000,"y":0},{"x":1795407900000,"y":0},{"x":1795407960000,"y":0},{"x":1795408020000,"y":0},{"x":1795408080000,"y":0},{"x":1795408140000,"y":0},{"x":1795408200000,"y":0},{"x":1795408260000,"y":0},{"x":1795408320000,"y":0},{"x":1795408380000,"y":0},{"x":1795408440000,"y":0},{"x":1795408500000,"y":0},{"x":1795408560000,"y":0},{"x":1795408620000,"y":0},{"x":1795408680000,"y":0},{"x":1795408740000,"y":0},{"x":1795408800000,"y":0},{"x":1795408860000,"y":0},{"x":1795408920000,"y":0},{"x":1795408980000,"y":0},{"x":1795409040000,"y":0},{"x":1795409100000,"y":0},{"x":1795409160000,"y":0},{"x":1795409220000,"y":0},{"x":1795409280000,"y":0},{"x":1795409340000,"y":0},{"x":1795409400000,"y":0},{"x":1795409460000,"y":0},{"x":1795409520000,"y":0},{"x":1795409580000,"y":0},{"x":1795409640000,"y":0},{"x":1795409700000,"y":0},{"x":1795409760000,"y":0},{"x":1795409820000,"y":0},{"x":1795409880000,"y":0},{"x":1795409940000,"y":0},{"x":1795410000000,"y":0},{"x":1795410060000,"y":0},{"x":1795410120000,"y":0},{"x":1795410180000,"y":0},{"x":1795410240000,"y":0},{"x":1795410300000,"y":0},{"x":1795410360000,"y":0},{"x":1795410420000,"y":0},{"x":1795410480000,"y":0},{"x":1795410540000,"y":0},{"x":1795410600000,"y":0},{"x":1795410660000,"y":0},{"x":1795410720000,"y":0},{"x":1795410780000,"y":0},{"x":1795410840000,"y":0},{"x":1795410900000,"y":0},{"x":1795410960000,"y":0},{"x":1795411020000,"y":0},{"x":1795411080000,"y":0},{"x":1795411140000,"y":0},{"x":1795411200000,"y":0},{"x":1795411260000,"y":0},{"x":1795411320000,"y":0},{"x":1795411380000,"y":0},{"x":1795411440000,"y":0},{"x":1795411500000,"y":0},{"x":1795411560000,"y":0},{"x":1795411620000,"y":0},{"x":1795411680000,"y":0},{"x":1795411740000,"y":0},{"x":1795411800000,"y":0},{"x":1795411860000,"y":0},{"x":1795411920000,"y":0},{"x":1795411980000,"y":0},{"x":1795412040000,"y":0},{"x":1795412100000,"y":0},{"x":1795412160000,"y":0},{"x":1795412220000,"y":0},{"x":1795412280000,"y":0},{"x":1795412340000,"y":0},{"x":1795412400000,"y":0},{"x":1795412460000,"y":0},{"x":1795412520000,"y":0},{"x":1795412580000,"y":0},{"x":1795412640000,"y":0},{"x":1795412700000,"y":0},{"x":1795412760000,"y":0},{"x":1795412820000,"y":0},{"x":1795412880000,"y":0},{"x":1795412940000,"y":0},{"x":1795413000000,"y":0},{"x":1795413060000,"y":0},{"x":1795413120000,"y":0},{"x":1795413180000,"y":0},{"x":1795413240000,"y":0},{"x":1795413300000,"y":0},{"x":1795413360000,"y":0},{"x":1795413420000,"y":0},{"x":1795413480000,"y":0},{"x":1795413540000,"y":0},{"x":1795413600000,"y":0},{"x":1795413660000,"y":0},{"x":1795413720000,"y":0},{"x":1795413780000,"y":0},{"x":1795413840000,"y":0},{"x":1795413900000,"y":0},{"x":1795413960000,"y":0},{"x":1795414020000,"y":0},{"x":1795414080000,"y":0},{"x":1795414140000,"y":0},{"x":1795414200000,"y":0},{"x":1795414260000,"y":0},{"x":1795414320000,"y":0},{"x":1795414380000,"y":0},{"x":1795414440000,"y":0},{"x":1795414500000,"y":0},{"x":1795414560000,"y":0},{"x":1795414620000,"y":0},{"x":1795414680000,"y":0},{"x":1795414740000,"y":0},{"x":1795414800000,"y":0},{"x":1795414860000,"y":0},{"x":1795414920000,"y":0},{"x":1795414980000,"y":0},{"x":1795415040000,"y":0},{"x":1795415100000,"y":0},{"x":1795415160000,"y":0},{"x":1795415220000,"y":0},{"x":1795415280000,"y":0},{"x":1795415340000,"y":0},{"x":1795415400000,"y":0},{"x":1795415460000,"y":0},{"x":1795415520000,"y":0},{"x":1795415580000,"y":0},{"x":1795415640000,"y":0},{"x":1795415700000,"y":0},{"x":1795415760000,"y":0},{"x":1795415820000,"y":0},{"x":1795415880000,"y":0},{"x":1795415940000,"y":0},{"x":1795416000000,"y":0},{"x":1795416060000,"y":0},{"x":1795416120000,"y":0},{"x":1795416180000,"y":0},{"x":1795416240000,"y":0},{"x":1795416300000,"y":0},{"x":1795416360000,"y":0},{"x":1795416420000,"y":0},{"x":1795416480000,"y":0},{"x":1795416540000,"y":0},{"x":1795416600000,"y":0},{"x":1795416660000,"y":0},{"x":1795416720000,"y":0},{"x":1795416780000,"y":0},{"x":1795416840000,"y":0},{"x":1795416900000,"y":0},{"x":1795416960000,"y":0},{"x":1795417020000,"y":0},{"x":1795417080000,"y":0},{"x":1795417140000,"y":0},{"x":1795417200000,"y":0},{"x":1795417260000,"y":0},{"x":1795417320000,"y":0},{"x":1795417380000,"y":0},{"x":1795417440000,"y":0},{"x":1795417500000,"y":0},{"x":1795417560000,"y":0},{"x":1795417620000,"y":0},{"x":1795417680000,"y":0},{"x":1795417740000,"y":0},{"x":1795417800000,"y":0},{"x":1795417860000,"y":0},{"x":1795417920000,"y":0},{"x":1795417980000,"y":0},{"x":1795418040000,"y":0},{"x":1795418100000,"y":0},{"x":1795418160000,"y":0},{"x":1795418220000,"y":0},{"x":1795418280000,"y":0},{"x":1795418340000,"y":0},{"x":1795418400000,"y":0},{"x":1795418460000,"y":0},{"x":1795418520000,"y":0},{"x":1795418580000,"y":0},{"x":1795418640000,"y":0},{"x":1795418700000,"y":0},{"x":1795418760000,"y":0},{"x":1795418820000,"y":0},{"x":1795418880000,"y":0},{"x":1795418940000,"y":0},{"x":1795419000000,"y":0},{"x":1795419060000,"y":0},{"x":1795419120000,"y":0},{"x":1795419180000,"y":0},{"x":1795419240000,"y":0},{"x":1795419300000,"y":0},{"x":1795419360000,"y":0},{"x":1795419420000,"y":0},{"x":1795419480000,"y":0},{"x":1795419540000,"y":0},{"x":1795419600000,"y":0},{"x":1795419660000,"y":0},{"x":1795419720000,"y":0},{"x":1795419780000,"y":0},{"x":1795419840000,"y":0},{"x":1795419900000,"y":0},{"x":1795419960000,"y":0},{"x":1795420020000,"y":0},{"x":1795420080000,"y":0},{"x":1795420200000,"y":0},{"x":1795420260000,"y":0},{"x":1795420320000,"y":0},{"x":1795420380000,"y":0},{"x":1795420440000,"y":0},{"x":1795420500000,"y":0},{"x":1795420560000,"y":0},{"x":1795420620000,"y":0},{"x":1795420680000,"y":0},{"x":1795420740000,"y":0},{"x":1795420800000,"y":0},{"x":1795420860000,"y":0},{"x":1795420920000,"y":0},{"x":1795420980000,"y":0},{"x":1795421040000,"y":0},{"x":1795421100000,"y":0},{"x":1795421160000,"y":0},{"x":1795421220000,"y":0},{"x":1795421280000,"y":0},{"x":1795421340000,"y":0},{"x":1795421400000,"y":0},{"x":1795421460000,"y":0},{"x":1795421520000,"y":0},{"x":1795421580000,"y":0},{"x":1795421640000,"y":0},{"x":1795421700000,"y":0},{"x":1795421760000,"y":0},{"x":1795421820000,"y":0},{"x":1795421880000,"y":0},{"x":1795421940000,"y":0},{"x":1795422000000,"y":0},{"x":1795422060000,"y":0},{"x":1795422120000,"y":0},{"x":1795422180000,"y":0},{"x":1795422240000,"y":0},{"x":1795422300000,"y":0},{"x":1795422360000,"y":0},{"x":1795422420000,"y":0},{"x":1795422480000,"y":0},{"x":1795422540000,"y":0},{"x":1795422600000,"y":0},{"x":1795422660000,"y":0},{"x":1795422720000,"y":0},{"x":1795422780000,"y":0},{"x":1795422840000,"y":0},{"x":1795422900000,"y":0},{"x":1795422960000,"y":0},{"x":1795423020000,"y":0},{"x":1795423080000,"y":0},{"x":1795423140000,"y":0},{"x":1795423200000,"y":0},{"x":1795423260000,"y":0},{"x":1795423320000,"y":0},{"x":1795423380000,"y":0},{"x":1795423440000,"y":0},{"x":1795423500000,"y":0},{"x":1795423560000,"y":0},{"x":1795423620000,"y":0},{"x":1795423680000,"y":0},{"x":1795423740000,"y":0},{"x":1795423800000,"y":0},{"x":1795423860000,"y":0},{"x":1795423920000,"y":0},{"x":1795423980000,"y":0},{"x":1795424040000,"y":0},{"x":1795424100000,"y":0},{"x":1795424160000,"y":0},{"x":1795424220000,"y":0},{"x":1795424280000,"y":0},{"x":1795424340000,"y":0},{"x":1795424400000,"y":0},{"x":1795424460000,"y":0},{"x":1795424520000,"y":0},{"x":1795424580000,"y":0}],"highlightExtremes":false,"unit":" mm"}], {"yLabel":"mm","yMin":0}); }); $('.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; }