'; 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/leienkaul/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 = [ 1 , 1 , 2 , 5 , 1 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 10 , 0 , 0 , 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', 'Aug. 2023', 'Okt. 2023', 'Nov. 2023', 'Dez. 2023', 'Jan. 2024', 'März 2024', 'Apr. 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: [ 52.94018771151113 , 39.888720656749186 , 46.192791734426706 , 37.60605313166219 , 32.83813227358533 , 23.26690759418571 , 69.61414901085669 , 59.41975247725864 , 61.50835027975872 , 42.26423566548894 , 42.26423566548894 , 48.283626885634135 , 109.05561023737378 , 85.9663164698855 , 43.30538867493205 , 37.478638903312635 , 37.162109873578764 , 31.874619287537957 , 29.971668282326608 , 44.71251460854468 , 23.750478069953363 , 84.3201219512195 , 23.031482447685534 , 68.9064641673189 , 38.785710419039134 , 49.8636144002134 , 43.60405666599916 , 39.23103418326043 , 30.28293131468651 , 22.923940734176995 , 34.25069557477032 , 40.60647747621542 , 38.89650168692409 , 35.26781180543596 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 36.542515811665496, 37.142857142857146, 51.111111111111114, 51.111111111111114, 37.142857142857146, 29.55832389580974, 37.142857142857146, 38, 38, 38, 38, 38, 45.833333333333336, 45.833333333333336, 39.72194637537239, 38, 38, 32.78688524590164, 31.818181818181817, 69.2090395480226, 29.576271186440678, 123.78048780487805, 37.5, 54.583333333333336, 37.5, 37.5, 34.319526627218934, 37.5, 37, 34, 34.64203233256351, 32, 34.64203233256351, 34.64203233256351 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Leienkaul', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });