'; 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/wiek/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 , 22 , 5 , 3 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 4 , 1 , 15 , 12 , 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', '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', 'Feb. 2024', 'März 2024', 'Apr. 2024', 'Mai 2024', 'Juni 2024', 'Juli 2024', 'Aug. 2024', 'Sept. 2024', 'Okt. 2024', 'Nov. 2024', 'Dez. 2024', 'Jan. 2025', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 189.30388858831284 , 199.8482915790499 , 153.88488832565838 , 192.63100055297326 , 189.68721315069843 , 126.6618437941058 , 347.70305767544926 , 343.88253014042266 , 434.00914896668826 , 434.00914896668826 , 474.2029292184536 , 468.82512376033355 , 470.73720342634994 , 436.96025990492427 , 364.73472343037156 , 419.3885382550662 , 427.0414614359437 , 400.0721850454055 , 390.443553733309 , 376.8589383486936 , 390.3020856642667 , 259.8869881508772 , 329.99817357486046 , 297.6586935862883 , 307.47002613030185 , 255.56159439345865 , 251.8085372848181 , 271.42734188991767 , 281.81773755102444 , 294.94592902742295 , 305.6405167834812 , 287.2452445321019 , 282.91386985042874 , 314.0349413825594 , 309.19506618553004 , 319.91292282201687 , 323.3715401652341 , 319.8212589018534 , 335.8052855323682 , 306.5331396740341 , 287.6791978679909 , 272.85761932303234 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 207.14285714285714, 177.89661319073085, 15, 101.09179134654266, 101.09179134654266, 60.21699819168174, 429.42494398805076, 429.42494398805076, 484.57943925233644, 484.57943925233644, 633.7579617834394, 500, 633.7579617834394, 500, 451.03092783505156, 500, 500, 481.40043763676147, 360, 360, 425, 330.69620253164555, 330.69620253164555, 320.88285229202035, 350, 300, 294.58128078817737, 300, 300, 300, 300, 300, 294.58128078817737, 300, 300, 300, 300, 300, 319.64285714285717, 300, 289.9961612284069, 289.99670510708404 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Wiek', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });