'; 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/mittelstetten/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 , 5 , 7 , 1 , 2 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 2 , 0 , 0 , 0 , 13 ]; 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', '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', '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: [ 906.8698486182833 , 821.0784915883112 , 633.2123417472843 , 758.6126984783874 , 807.1776882295209 , 997.7202278955435 , 866.9038207002444 , 1059.7159591841707 , 1053.7541852863949 , 1053.7541852863949 , 1086.9002705819125 , 1149.75211592353 , 1105.3919709752502 , 1178.4767703657405 , 1079.1869996890684 , 1073.4822965094486 , 1099.8816458344468 , 1073.915625306799 , 926.5540380104097 , 1035.383960071596 , 1088.1311218498 , 901.382468545779 , 841.0256825994574 , 781.6192441212538 , 743.9913925942851 , 789.0908576429441 , 712.2283150601022 , 699.0172218103976 , 730.601286529122 , 817.6310439834002 , 847.0135133103431 , 793.2348392434328 , 885.2917822890704 , 717.3508771728641 , 709.168106321333 , 645.4996471083778 , 750 , 789.2560882645892 , 673.0529801997337 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 688.0733944954128, 712.8571428571429, 853.7782139352306, 712.8571428571429, 776.4642082429501, 1315.7894736842106, 861.5384615384615, 1078.5083415112856, 941.8509418509418, 941.8509418509418, 1178.16091954023, 1230.2325581395348, 1075, 1198.9459815546772, 1000, 984.8484848484849, 1005.6315366049879, 1005.6315366049879, 988.1422924901186, 984.8484848484849, 984.8484848484849, 946.1663947797716, 915.0492353481304, 809.3023255813954, 800, 850, 800, 800, 800, 790.6542056074767, 866.6666666666666, 790.6542056074767, 946.1663947797716, 750, 750, 750, 750, 790, 790 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Mittelstetten', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });