'; 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/kirchehrenbach/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 , 12 , 4 , 0 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 1 , 1 , 2 , 15 ]; 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', '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', 'Juli 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: [ 309.88213574734885 , 442.9932144662102 , 434.0975513489321 , 660.9974474307488 , 633.5996170807764 , 525.684943270058 , 636.2296270807002 , 451.40392398163607 , 585.3674741795198 , 585.3674741795198 , 511.2971243257004 , 486.38304176922134 , 517.6526202006535 , 458.96305858730267 , 473.57731308694696 , 511.6811320035197 , 460.52421379944457 , 487.8949096096462 , 457.0424411283927 , 408.00854666655994 , 463.548381900736 , 465.6812029222956 , 517.909833117114 , 424.56521031716903 , 361.77546087875925 , 440.77231159598034 , 418.5597886374772 , 385.3570312877314 , 387.69773638273347 , 416.0434708282372 , 439.548327010044 , 508.3683405147309 , 535.3714635512689 , 436.3953405836561 , 426.2494162040146 , 463.03175559024385 , 596.2903278581246 , 534.6895131703898 , 527.1732620532035 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 164.5, 467.72151898734177, 326, 904.7619047619048, 904.7619047619048, 598.0132450331126, 719.2066805845511, 517.3362685745735, 530.6122448979592, 530.6122448979592, 525, 510.9028960817717, 517.3362685745735, 500, 500, 530.6122448979592, 428.57142857142856, 433.70411568409344, 530.6122448979592, 530.6122448979592, 530.6122448979592, 530.6122448979592, 557.9331941544885, 530.6122448979592, 454.8283333333333, 454.8283333333333, 454.8283333333333, 362.116991643454, 452.755905511811, 452.755905511811, 452.755905511811, 530.6122448979592, 618.75, 452.755905511811, 452.755905511811, 454.8283333333333, 428.57142857142856, 531.496062992126, 531.496062992126 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Kirchehrenbach', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });