'; 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/riegelsberg/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 , 2 , 0 , 7 , 2 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 4 , 6 , 0 , 0 , 1 ]; 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', 'Mai 2024', 'Juli 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: [ 120.4277529386934 , 129.52207125221963 , 160.4334630917133 , 277.2993036073533 , 266.0941470809678 , 271.75076287919126 , 153.09576863181152 , 134.02658049349566 , 151.4519373330329 , 181.92022013583812 , 181.92022013583812 , 150.87779334152643 , 161.25521614506138 , 157.36057924790202 , 144.97842793492035 , 135.94279482559838 , 129.09058654363142 , 113.90002920458525 , 129.36190579077999 , 115.83261613681414 , 107.21048557250577 , 114.86229214529895 , 115.25288292535593 , 110.3893301675931 , 206.31390189344432 , 189.4604561670455 , 215.8663010905346 , 134.75114833899698 , 247.45142743425788 , 121.08339503704332 , 144.96128398214742 , 262.3972096293195 , 188.09339114525815 , 124.56266032754016 , 159.33913241254118 , 157.9880567192154 , 179.60423210041193 , 152.74933098720072 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 81.52173913043478, 93.75, 101.22535961640916, 119.43319838056681, 109.0909090909091, 140.98690835850957, 123.02284710017575, 95, 118.46001974333663, 130, 130, 111.42857142857143, 123.02284710017575, 128.48587772613516, 125.63451776649747, 130, 127.5, 110.75441412520064, 123.02284710017575, 135, 130, 130, 130, 111.7580766341097, 177.77777777777777, 177.77777777777777, 236.5415986949429, 143.75, 253.93216463414635, 106.06060606060606, 106.06060606060606, 253.93216463414635, 234.0764331210191, 158.25688073394497, 159.23566878980893, 120.83333333333333, 158.25688073394497, 117.3529411764706 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Riegelsberg', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });