'; 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/dudenhofen/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 , 6 , 2 , 1 , 0 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 1 , 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', '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', 'Sept. 2024', 'Nov. 2024', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 391.60079600519373 , 719.9521487772404 , 901.5806650537664 , 653.2193908744588 , 616.276854786116 , 640.0998236332985 , 586.8341899175518 , 782.8102029131835 , 834.3723513432604 , 811.3263838733988 , 811.3263838733988 , 807.2856079183839 , 798.1680932414918 , 655.709962613034 , 525.575238808395 , 675.8378406750934 , 633.2252269416174 , 542.3048933525391 , 546.3969037529969 , 741.8555933029661 , 678.2103490574472 , 718.5239788743007 , 656.8982884771451 , 585.6936524740814 , 667.0130339223617 , 726.6775402543848 , 655.3077391119589 , 597.0623826020303 , 588.2643168118914 , 580.0365928949541 , 1278.1573495890334 , 734.6421162488313 , 811.9866700119591 , 781.4860124945417 , 845.2840427060149 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 362.72189349112426, 510.1289134438306, 917.6470588235294, 646.9002695417789, 620, 582.1078431372549, 646.9002695417789, 736.4975450081834, 805.6478405315614, 805.6478405315614, 805.6478405315614, 840, 800, 766.6666666666666, 569.8005698005697, 691.304347826087, 673.5436893203884, 625, 561.4035087719299, 688.8888888888889, 687.9058017912691, 654.7619047619048, 662.4764046748866, 649.5175346370412, 689.6551724137931, 728.631675644077, 689.6551724137931, 565.2173913043479, 554.3175487465181, 549.0196078431372, 966.3299663299663, 652.8662420382166, 802.8455284552846, 881.4009661835748, 881.4009661835748 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Dudenhofen', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });