'; 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/allersberg/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 , 4 , 12 , 1 , 1 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 1 , 4 , 1 , 12 ]; 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', 'Mai 2024', 'Juni 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: [ 492.8547355958758 , 303.8028576451278 , 310.2414171552826 , 313.37893387471956 , 287.58755654252354 , 426.4665997486119 , 400.3804483155225 , 463.84757082571343 , 469.6396674832879 , 500.7696162496343 , 500.7696162496343 , 487.8195885358025 , 461.76534003269313 , 410.51742015169003 , 432.60362622687927 , 462.4392001545122 , 417.01900574812566 , 473.56608409700755 , 477.34519964402466 , 403.17816594628107 , 388.0615211429814 , 394.9537170602519 , 369.3393301640619 , 376.21456100372654 , 358.90371442829013 , 360.2963992829118 , 479.8701510017336 , 548.2117809082749 , 578.6027921067326 , 265.9414935900807 , 520.7348941274123 , 495.0373043985913 , 368.93503592904864 , 395.7291282516109 , 407.36985790405697 , 403.7541715039715 , 412.3393435954822 , 437.0717602515028 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 338.78962947113155, 190, 244.51612903225808, 317.79661016949154, 317.39238971506006, 352.94117647058823, 359.3429158110883, 396.41434262948206, 370, 375, 375, 385.80645161290323, 375.3246753246753, 367.741935483871, 400, 400, 395, 375.3246753246753, 400, 392.9577464788732, 400, 400, 363.19612590799034, 385.13513513513516, 385.13513513513516, 385.13513513513516, 402.63157894736844, 450.8580343213728, 500, 278.99343544857766, 385.13513513513516, 427.3927392739274, 427.3927392739274, 378.173719376392, 378.173719376392, 392.85714285714283, 354.3258536585366, 436.026936026936 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Allersberg', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });