'; 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/graefelfing/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 , 1 , 8 , 8 , 1 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 0 , 0 , 0 , 18 ]; 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', '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', 'Sept. 2023', 'Okt. 2023', 'Nov. 2023', 'Dez. 2023', 'Jan. 2024', 'Feb. 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: [ 1921.7134047156928 , 1823.148443122998 , 2831.359287764874 , 2026.158637982762 , 1843.396528749539 , 2073.133528759604 , 2489.6261634469124 , 2388.5635875607363 , 2754.5010528667603 , 2754.5010528667603 , 2836.88815598558 , 2767.115646607894 , 2909.873011236677 , 2912.5764152133966 , 2995.1145488276725 , 2949.108350769068 , 2980.887122780518 , 2793.3273961822865 , 2445.9848871726376 , 2735.878278789306 , 3085.929155727751 , 2778.1596076362052 , 2612.171859402707 , 2885.7870074890384 , 2876.0207321395146 , 2950.0783040521387 , 2930.1056324829206 , 2388.2610667323474 , 2758.515142891113 , 2221.489516451369 , 2461.271334908424 , 2378.6870802644003 , 2106.010665511894 , 2037.2979578330774 , 2170.592161809228 , 2406.613976278267 , 2363.099100015911 , 2295.3320053903153 , 2430.5865987354896 , 2316.3946682768646 , 2072.009589414001 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 2345.762711864407, 2160.8040201005024, 2446.153846153846, 2029.3951384963257, 2029.3951384963257, 2065.868263473054, 2411.642411642412, 2544.8613376835237, 2849.2808005003126, 2849.2808005003126, 2864.9386084583903, 2864.9386084583903, 2864.9386084583903, 2903.2258064516127, 2987.012987012987, 2970.5882352941176, 2979.7979797979797, 2793.150684931507, 2797.2027972027972, 2638.2978723404253, 2850.7795100222716, 2739.1304347826085, 2638.2978723404253, 2730.173199635369, 2730.173199635369, 2594.3396226415093, 2985.0746268656717, 2730.173199635369, 2707.6923076923076, 2713.6258660508083, 2689.1522333637195, 2574.2574257425745, 2086.41975308642, 2217.973231357553, 2217.973231357553, 2457.466918714556, 2457.466918714556, 2376.237623762376, 2556.3909774436092, 2457.466918714556, 2161.1253196930948 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Gräfelfing', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });