'; 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/erdweg/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 , 5 , 7 , 2 , 3 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 0 , 1 , 0 , 16 ]; buildCharts(areaChartData, qmPriceChartData); new Chart(document.getElementById("trend-chart"), { type: 'line', data: { labels: [ 'Apr. 2021', 'Aug. 2021', 'Nov. 2021', 'Dez. 2021', 'Jan. 2022', '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', 'Apr. 2023', 'Mai 2023', 'Juni 2023', 'Juli 2023', 'Aug. 2023', 'Sept. 2023', 'Okt. 2023', 'Nov. 2023', 'Dez. 2023', 'Jan. 2024', 'März 2024', 'Apr. 2024', 'Juni 2024', 'Juli 2024', 'Sept. 2024', 'Nov. 2024', 'Dez. 2024', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 1190.3260321891346 , 949.4802402778475 , 1359.7440273863067 , 759.9333661844711 , 803.4508999685992 , 890.2010419779563 , 1211.9706823516663 , 1182.644639205676 , 1193.8014516560527 , 1281.6186006326725 , 1281.6186006326725 , 1238.7669811728854 , 1286.9798667943132 , 1441.0423820737078 , 1306.1325019643457 , 1104.0006944456666 , 1278.396756476651 , 1130.399503222636 , 1166.8694467721969 , 815.2050498964906 , 891.4649204992049 , 1063.644495605851 , 936.3907798292782 , 911.2553299886999 , 898.5220652865383 , 838.6999963138372 , 842.3624967198126 , 797.5247062062797 , 959.5702947160129 , 1004.8919708580531 , 776.6760035306929 , 748.7974966578936 , 1016.8478053316986 , 856.975069165573 , 806.4605845763195 , 789.5355521752059 , 826.9963416807329 , 832.798362960488 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 919.4499017681729, 628.875110717449, 965.5555555555555, 588.2352941176471, 776.4642082429501, 894.2652329749104, 1300, 1190.779014308426, 1078.5083415112856, 1057.142857142857, 1057.142857142857, 1057.142857142857, 1198.9459815546772, 1272.1499137525482, 1125.6117455138663, 1001.2594458438288, 1079.9278846153845, 1001.2594458438288, 1080.788804071247, 923.0769230769231, 923.0769230769231, 1000, 923.0769230769231, 921.1981566820276, 919.080459770115, 891.4649681528663, 919.080459770115, 946.1663947797716, 917.5675675675676, 1190, 862.9441624365483, 877.027027027027, 998.0430528375734, 813.1067961165048, 803.7974683544304, 813.1067961165048, 813.1067961165048, 813.1067961165048 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Erdweg', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });