'; 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/aidhausen/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 , 0 , 9 , 3 , 1 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 13 , 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', 'Juni 2023', 'Juli 2023', 'Aug. 2023', 'Okt. 2023', 'Nov. 2023', 'Dez. 2023', '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: [ 129.73628217691436 , 79.25225042529291 , 84.78952004901045 , 1.2059369202226344 , 116.11816125609377 , 104.93040996270626 , 110.87413835274522 , 107.59145700534685 , 116.3373701916042 , 127.52391903855526 , 127.52391903855526 , 115.59675118118027 , 102.41660409114138 , 98.73980451371348 , 99.90504387220491 , 63.75747535741402 , 74.07493968556415 , 63.807253472928636 , 98.21041143009678 , 66.69712774162227 , 83.75659860434264 , 80.94897752602711 , 139.64280982503365 , 95.85598874553916 , 96.58511455270148 , 62.74275604233443 , 58.10013235833164 , 65.4873352053718 , 58.5703286300788 , 56.1470472007183 , 48.59256451475005 , 49.997195579009386 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 119.10112359550561, 63.28524895300139, 105.4590570719603, 0 , 40.69767441860465, 34.5, 90.74410163339383, 34.5, 95.53349875930522, 73.20099255583126, 73.20099255583126, 55.72441742654509, 55.679300827966884, 55, 55.679300827966884, 55, 55.68077276908924, 55.14705882352941, 71.42857142857143, 95.02923976608187, 103.1636863823934, 95.02923976608187, 103.1636863823934, 104.24028268551237, 104.24028268551237, 90.20217729393468, 55.89972401103956, 57.50122669283612, 57.50122669283612, 57.29327965314339, 47.29973474801061, 47.29959514170041 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Aidhausen', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });