'; 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/fuerstenfeldbruck/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 , 8 , 11 , 4 , 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 , 0 , 23 ]; 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', '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', 'Jan. 2025', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 1245.3340332027583 , 1182.8309977804422 , 1610.1149728250646 , 1278.1406172630102 , 1257.2229384505945 , 1525.0015846484032 , 1555.2425626804488 , 1788.2873180249383 , 1931.2624746149468 , 1822.6957946535993 , 1822.6957946535993 , 2105.3758547410116 , 1988.8019255461888 , 1897.784914881974 , 1990.4561884059624 , 1785.5533429747288 , 1860.0590247314506 , 1734.6096264259672 , 1783.950398123311 , 1789.9921454927257 , 1647.6771954416115 , 1598.1733250819946 , 1473.8538867626007 , 1443.3404688621138 , 1459.8023422852 , 1384.6988261909598 , 1405.980311847793 , 1352.8542641801819 , 1431.1861847817659 , 1188.3018328922071 , 1286.0880887123956 , 1587.222441246074 , 1209.6035879208325 , 1358.080533638219 , 1527.4328548796282 , 1220.6173997303117 , 1469.202691703615 , 1302.2847073388052 , 1281.7383221978757 , 1523.8842061750909 , 1172.7597157724679 , 1306.7249764404112 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 1285.7142857142858, 1212.2664111164352, 1654.1822721598003, 1333.3333333333333, 1300, 1517.2817809021676, 1709.4017094017095, 1783.3333333333333, 1900.6479481641468, 1754.2168674698796, 1754.2168674698796, 1930.5019305019305, 1836.734693877551, 1649.6018202502844, 1701.093560145808, 1453.4883720930231, 1752.0992605589674, 1437.5987361769353, 1532.1252059308072, 1551.4809590973202, 1494.4649446494466, 1500, 1311.111111111111, 1345.119139123751, 1345.119139123751, 1300, 1316.1764705882354, 1300, 1356.9405099150142, 1217.5324675324675, 1204.5454545454545, 1601.4669926650367, 1229.7772567409145, 1601.3745704467353, 1601.4669926650367, 1456.164383561644, 1601.3745704467353, 1277.5330396475772, 1588.235294117647, 1601.3745704467353, 1374.570446735395, 1376.5281173594133 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Fürstenfeldbruck', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });