'; 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/baisweil/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 , 4 , 2 , 1 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 1 , 0 , 0 , 3 , 4 ]; buildCharts(areaChartData, qmPriceChartData); new Chart(document.getElementById("trend-chart"), { type: 'line', data: { labels: [ 'Apr. 2021', 'Aug. 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: [ 187.12518181844035 , 215.13477533608364 , 383.024686276387 , 383.024686276387 , 530.8303603037679 , 478.38941242774973 , 495.6969670087328 , 272.282450330377 , 408.852170326022 , 408.852170326022 , 314.58246370924576 , 309.5748393584912 , 288.7794204898679 , 400.0521861096381 , 467.1485541272406 , 353.5422381535863 , 349.2120008739825 , 395.9604589309463 , 216.17969014559557 , 230.4374132482805 , 241.7257215354687 , 249.23231293650224 , 374.2525667979295 , 354.1489087140869 , 255.85922385852808 , 302.71327586380335 , 426.14481964133864 , 507.516354182169 , 116.44887540944067 , 455.9911185333179 , 512.8981561374308 , 426.16783185258487 , 481.74685598377283 , 458.51888594155724 , 465.5156990883706 , 467.1333829518171 , 483.6561394985117 , 493.70028787356523 , 592.7704174266656 , 701.3664134405611 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 179.21146953405017, 78.5070785070785, 425.531914893617, 425.531914893617, 415.38461538461536, 300, 391.56626506024094, 351.40845070422534, 415.38461538461536, 415.38461538461536, 307.6923076923077, 399.36102236421726, 289.51612903225805, 399.36102236421726, 525.7575757575758, 400.3813155386082, 340.26745913818723, 356.48038049940544, 335, 299, 299, 160, 609.0909090909091, 349.65034965034965, 200, 349.65034965034965, 531.0344827586207, 677.5456919060052, 7.587064676616915, 351.85185185185185, 613.7931034482758, 542, 613.7931034482758, 449.66442953020135, 450, 449.66442953020135, 509.88553590010406, 440.02607561929597, 468.15816857440166, 468.15816857440166 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Baisweil', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });