'; 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/paunzhausen/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 , 7 , 2 , 3 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 3 , 0 , 0 , 1 , 11 ]; 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', 'Juni 2024', 'Juli 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: [ 970.8148322569666 , 1068.7384665061354 , 946.5419937650292 , 909.649117441076 , 900.2331650924463 , 1189.4549268573996 , 866.9780230078154 , 869.2023561547943 , 895.1655861449387 , 898.3200648485546 , 898.3200648485546 , 943.8289086427244 , 915.2353443344194 , 915.9977516038583 , 838.359531893944 , 881.8014160123133 , 891.6670852495222 , 885.5392364247036 , 905.2518410767998 , 839.3542348301041 , 798.5128916179049 , 795.7026208170572 , 820.9765082221221 , 785.6998422423534 , 695.1114243185121 , 739.3052508350532 , 693.0707417809422 , 643.0742144026088 , 737.8263046582872 , 679.130096928217 , 524.9588352165194 , 540.2104844727886 , 643.4449959122956 , 835.6060691283724 , 844.3346546149302 , 694.9036744347827 , 734.4963140329841 , 667.5490565087142 , 526.4604615811035 , 555.1945336006909 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 852.3725834797891, 851.4285714285714, 1043.7685459940653, 1043.7685459940653, 1043.7685459940653, 1248.8636363636363, 895.1406649616368, 883.1041257367388, 883.1041257367388, 883.1041257367388, 883.1041257367388, 1053.9906103286385, 1053.9906103286385, 1053.9906103286385, 936.6197183098592, 1013.5135135135135, 936.6197183098592, 950, 1026.8562401263823, 850, 850, 843.9716312056737, 837.8378378378378, 816.0919540229885, 725.6461232604373, 736.1702127659574, 736.1702127659574, 715.7057654075546, 740, 682.961897915169, 566, 544.1917350178966, 716.8458781362007, 809.5854922279793, 934.065934065934, 807.2916666666666, 809.5854922279793, 701.0014306151645, 544.1612063549053, 645.1612903225806 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Paunzhausen', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });