'; 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/marzling/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 , 8 , 0 , 0 ]; 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 , 16 ]; 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', 'Juli 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: [ 858.9849122344995 , 1327.3274281097742 , 971.8324215100693 , 768.2092098814197 , 765.7738220204009 , 790.8779486382448 , 773.1327257681698 , 884.9405650376259 , 974.4923652753604 , 1033.622096132292 , 1033.622096132292 , 1213.2456343300485 , 1335.304305262894 , 1199.6168408315937 , 1306.5741455488132 , 1226.378774116078 , 1082.6381212650708 , 1054.1408543964008 , 1050.592507282418 , 1090.8101289122474 , 1238.5240236459235 , 1339.585882230126 , 1364.5331425056368 , 1300.573536749905 , 1289.8722798895874 , 1414.4553988611606 , 1567.8854238452293 , 1424.1218097642152 , 1480.0332673417408 , 1451.066733755489 , 1351.1844706948375 , 1216.7620730966269 , 1284.2741462087106 , 1353.4794795237683 , 1463.694935585945 , 1332.457365855634 , 1262.5769722779307 , 1083.9478838076766 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 836.1204013377926, 1044, 1044, 650, 650, 650, 350, 968.8715953307393, 1058.8235294117646, 850, 850, 1171.3615023474179, 1299, 1111.111111111111, 1208.3333333333333, 1201.5113350125944, 904.4117647058823, 1100, 952.8499850113486, 1122.5, 1163.0615640599, 1501.4720314033366, 1507.7519379844962, 1477.8278301886792, 1477.8278301886792, 1505.8139534883721, 1557.935735150925, 1488, 1477.8278301886792, 1400, 1400, 1300, 1448.467966573816, 1448.467966573816, 1452.513966480447, 1448.467966573816, 1357.142857142857, 1031.25 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Marzling', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });