'; 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/sinzheim/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 , 1 , 3 , 5 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 3 , 1 , 1 , 1 , 5 ]; 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', '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: [ 338.9042015713661 , 308.5778678036431 , 445.528106296846 , 635.2208559360474 , 631.2851609962622 , 559.4155979657452 , 591.0341319813541 , 741.9205466071375 , 455.4154052062852 , 529.064721376198 , 529.064721376198 , 498.94764082884393 , 516.1307344913002 , 562.8096622335922 , 495.31141452272254 , 411.26227245686636 , 453.68413287807044 , 496.8406521995989 , 466.19037362366237 , 564.7378831079379 , 631.7441330455514 , 534.0631719504574 , 477.1965218860608 , 473.6378100411942 , 825.9502470855971 , 742.6726548478291 , 546.1572516351268 , 567.0625750485729 , 589.6355706736396 , 569.0292680418715 , 646.2639612110216 , 611.9213243765042 , 384.11357544291604 , 555.9414424264182 , 699.5593602510996 , 150.79823997039063 , 411.04201032076253 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 320, 329.7832233741753, 518, 519, 519, 543.1994047619048, 542.6577380952381, 744.2528735632184, 213.38198771959227, 504.1518386714116, 504.1518386714116, 440.1639344262295, 497.5074775672981, 564.6836638338054, 446.06650446066504, 367.0891719745223, 376.4300847457627, 372.0508166969147, 372.0508166969147, 564.6836638338054, 564.6836638338054, 559.6570612050489, 414.28026905829597, 411.88217673489766, 670.2127659574468, 646.551724137931, 484.11497730711045, 538.4150030248034, 538.4150030248034, 550, 574.074074074074, 706.5669160432253, 414.2802481902792, 761.7021276595744, 656.0283687943263, 65.20247083047357, 407.6923076923077 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Sinzheim', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });