'; let req = new XMLHttpRequest(); req.onreadystatechange = function () { if (req.readyState === 4 && req.status === 200) { let result = JSON.parse(req.response); document.getElementById("landprices").innerHTML = result.data; buildCharts(result.charts.areaChartData, result.charts.qmPriceChartData); loading = false; } else if (req.readyState === 4) { loading = false; } }; const url = "/stadt/aitrang/aggregation?year=" + val[1] + "&month=" + val[0]; req.open('GET', url, true); setTimeout(function () { req.send(); }, 1200); } }) } const areaChartData = { labels: [], data: [] }; const qmPriceChartData = { labels: [], data: [] }; areaChartData.labels = [ "0 m² - 100 m²" , "100 m² - 500 m²" , "500 m² - 1000 m²" , "1000 m² - 2000 m²" , "2000 m²+" ]; areaChartData.data = [ 0 , 3 , 3 , 2 , 0 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 0 , 0 , 2 , 6 ]; buildCharts(areaChartData, qmPriceChartData); new Chart(document.getElementById("trend-chart"), { type: 'line', data: { labels: [ 'Apr. 2021', 'Aug. 2021', 'Nov. 2021', 'Dez. 2021', 'Feb. 2022', 'März 2022', 'Apr. 2022', 'Mai 2022', 'Juni 2022', 'Juli 2022', 'Aug. 2022', 'Sept. 2022', 'Okt. 2022', 'Nov. 2022', 'Dez. 2022', 'Jan. 2023', 'Feb. 2023', 'März 2023', 'Aug. 2023', 'Nov. 2023', 'Dez. 2023', 'Jan. 2024', 'März 2024', 'Apr. 2024', 'Mai 2024', 'Juni 2024', 'Aug. 2024', 'Sept. 2024', 'Okt. 2024', 'Nov. 2024', 'Dez. 2024', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 217.047632697995 , 230.5858619326017 , 333.3333333333333 , 327.8183641312133 , 278.458960034379 , 143.8778228451831 , 71.28934356173214 , 119.97558921321797 , 120.60085858096747 , 120.60085858096747 , 439.463273683242 , 524.894235352676 , 210.8214898423378 , 223.970674262211 , 312.02718437561936 , 282.08440378976496 , 367.56888328781906 , 408.3135937268601 , 601.9964467613866 , 198.49017428487628 , 388.8435396044612 , 364.9747156325287 , 248.99949288890718 , 327.9102667445257 , 401.20492582795396 , 335.2969527263922 , 371.48125986271714 , 430.5196883569351 , 484.585330206044 , 485.8760857369523 , 500.12874247076775 , 559.6817316154171 , 672.4138228557977 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 22.535734174865418, 78.5070785070785, 0 , 333.3333333333333, 322.30339492909326, 29.47761194029851, 11.332076118635351, 12.202954399486192, 15.486702821972239, 15.486702821972239, 399.36102236421726, 420.88091353996737, 91.7084394773605, 331.7535545023697, 379.08496732026146, 331.7535545023697, 390.32006245121, 357.97933409873707, 674.7404844290658, 200, 351.85185185185185, 351.85185185185185, 200, 351.85185185185185, 351.85185185185185, 351.85185185185185, 585.6515373352855, 509.88553590010406, 592.0205920205921, 543.4782608695652, 592.0205920205921, 741.3509060955519, 741.3509060955519 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Aitrang', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });