'; 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/wesel/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 , 7 , 12 , 6 , 2 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 2 , 10 , 7 , 4 , 4 ]; 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', 'Nov. 2023', 'Dez. 2023', 'Jan. 2024', 'März 2024', 'Apr. 2024', 'Mai 2024', 'Juni 2024', 'Sept. 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: [ 167.32677969164902 , 180.86896413662527 , 125.41433671409368 , 89.21244619509696 , 89.21244619509696 , 314.0825214542272 , 311.6808677173367 , 551.2781438815182 , 347.3002222655993 , 301.85517724888473 , 301.85517724888473 , 488.95849062198386 , 428.37638141626525 , 334.56603006945943 , 367.75311097407916 , 287.65947129828015 , 225.12330384364526 , 228.5851752147683 , 155.00321458553339 , 338.7506094754334 , 400.13696545980406 , 379.9498037761419 , 428.31349894155915 , 372.0447700270607 , 355.9522441471939 , 428.80855631941625 , 442.86689172712835 , 436.23957956782004 , 331.86613474786543 , 303.8140705696182 , 150.003323052456 , 224.81424707525466 , 322.4734618788531 , 313.466762423277 , 322.3976834740902 , 333.2504612961403 , 290.41517780707784 , 248.67606685881867 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 165.44850498338872, 123.60939431396787, 90.77461000537923, 14.986705342035291, 14.986705342035291, 280.11825572801183, 280.11825572801183, 468.70109546165884, 24.75383684471093, 270.625, 270.625, 303.00187617260787, 354.014598540146, 275.2659574468085, 275.8045977011494, 275.2659574468085, 275.2659574468085, 219.85688729874775, 154.2784967243135, 305.64516129032256, 320, 320, 345.08990318118947, 321.6252252252252, 300, 320, 321.6216216216216, 321.6216216216216, 300, 300, 159.72222222222223, 255.47445255474452, 320, 320.05689900426745, 320.4667863554758, 275.31380753138075, 275.31380753138075, 220.03154574132492 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Wesel', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });