'; 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/kaub/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 , 1 , 8 , 4 , 5 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 12 , 5 , 1 , 0 , 0 ]; 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', 'Mai 2024', 'Juni 2024', 'Juli 2024', 'Aug. 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: [ 115.56771994615038 , 162.17856172056293 , 243.6046980152216 , 141.75193533848358 , 138.87510334037043 , 99.9942970363143 , 172.29478273001914 , 162.13141759719997 , 215.16874016385975 , 218.31491517202625 , 218.31491517202625 , 228.50501607830103 , 227.7871453308375 , 221.79907926018424 , 162.61761488919956 , 188.2900775313727 , 161.90132454850874 , 144.8582313809569 , 136.7220804795153 , 138.74748844548233 , 119.9603889566106 , 85.22054743274161 , 115.59365367545834 , 118.31699033445152 , 110.7454869638905 , 79.70336081097174 , 100.27864942986034 , 167.1368561609517 , 104.25863506771525 , 113.61086327941237 , 156.4038292848128 , 121.24650202000903 , 126.26271803947539 , 126.45602807233581 , 151.259309861247 , 124.85378887406365 , 92.44502021035198 , 116.25826696642777 , 72.88560689348743 , 96.8964846393057 , 86.49246427468671 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 57.13651315789474, 120, 148.08652246256239, 120, 120, 91.32947976878613, 133.16831683168317, 142.34875444839858, 180, 164.23357664233578, 164.23357664233578, 164.23357664233578, 177.90262172284645, 177.90262172284645, 145.25547445255475, 160.1423487544484, 146.06741573033707, 145.25547445255475, 144.57308248914617, 144.57308248914617, 144.57308248914617, 78.43137254901961, 97.32360097323601, 97.32360097323601, 93.4065934065934, 65, 97.32360097323601, 144.57308248914617, 97.32360097323601, 130, 144.57308248914617, 130, 166.15853658536585, 166.15853658536585, 140.37854889589906, 121.2871287128713, 89.75, 89.9854862119013, 78.73563218390805, 78.73563218390805, 66.76342525399129 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Kaub', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });