'; 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/hoegel/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 , 0 , 0 , 1 , 4 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 4 , 1 , 0 , 0 , 0 ]; buildCharts(areaChartData, qmPriceChartData); new Chart(document.getElementById("trend-chart"), { type: 'line', data: { labels: [ 'Apr. 2021', 'Aug. 2021', 'Dez. 2021', 'Jan. 2022', 'März 2022', 'Aug. 2022', 'Sept. 2022', 'Okt. 2022', 'Nov. 2022', 'Dez. 2022', 'Jan. 2023', 'Feb. 2023', 'März 2023', '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: [ 338.1084735617655 , 469.1326290987476 , 5.3078126189143555 , 30.791704640586026 , 5.045246750649879 , 43.36945887571095 , 73.75132215843037 , 191.85992079139245 , 201.06238070823747 , 131.47513828010054 , 95.54905039827204 , 99.60892598147578 , 88.68389224187177 , 54.99581668464181 , 54.99581668464181 , 51.22722164331949 , 69.82186410995988 , 44.430594338463145 , 60.03801817722058 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 107.49185667752442, 338.3647798742138, 2.490354355488419, 14.995715509854328, 3.9949832775919734, 56, 97.20062208398134, 137.5, 137.5, 137.5, 175, 175, 106.25, 83.96946564885496, 83.96946564885496, 72.17521154803384, 110, 61.08077033630354, 70 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Högel', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });