'; 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/nuertingen/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 , 3 , 5 , 2 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 5 , 0 , 0 , 0 , 8 ]; 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', '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', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 378.91877751365814 , 447.6526635915021 , 807.6470744939351 , 754.6172356708449 , 842.5065930946631 , 806.965619618012 , 547.0705742944709 , 831.5971522930901 , 843.8312598257411 , 843.8312598257411 , 615.7246542357668 , 726.2503273978544 , 814.8691457843007 , 858.8884507207374 , 938.959855839214 , 907.691521371984 , 971.5798531746337 , 874.7288855404231 , 778.2123837571572 , 809.1388376898705 , 763.800522814574 , 748.57248746395 , 765.0529168614074 , 799.3373915308061 , 695.8141456679798 , 853.1302280303981 , 776.9633341195986 , 947.7731237434107 , 902.3656572725276 , 748.2844985198109 , 642.3424389488247 , 598.2834200299494 , 627.0942364063051 , 509.9080008517179 , 500.0926288823842 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 109.0909090909091, 103.64145658263305, 642.8571428571429, 800, 800, 800, 288.0842105263158, 825, 825, 825, 615.1142355008787, 838.0202474690664, 836.8200836820083, 839.3316195372751, 838.0202474690664, 825, 955.6313993174061, 825, 887.0967741935484, 908.8785046728972, 843.9531859557867, 843.9531859557867, 764.2436149312377, 780, 785.5361596009975, 972.5, 803.1147540983607, 1037.6134889753566, 896.8253968253969, 896.8253968253969, 796.6666666666666, 796.6666666666666, 796.6666666666666, 529.7619047619048, 670.4545454545455 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Nürtingen', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });