'; 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/emskirchen/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 , 7 , 2 , 4 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 5 , 4 , 2 , 1 , 7 ]; 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', 'Feb. 2024', 'März 2024', 'Apr. 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: [ 523.9980929123827 , 621.0433966377775 , 491.8539830726098 , 509.85269976320706 , 524.367487459987 , 540.1306620416442 , 470.4722594293685 , 577.7924643643543 , 569.6513154741664 , 607.4992850367929 , 607.4992850367929 , 526.0860725036785 , 510.55594172797356 , 503.1825676408416 , 551.765863222545 , 568.882258005331 , 554.0742906771108 , 487.2543486676478 , 502.06105131574515 , 402.68763861310504 , 445.4585845673296 , 442.89254109346825 , 397.1470849097017 , 365.34927238952673 , 398.7071707190744 , 406.7332684488933 , 316.2646305982491 , 291.1106895175137 , 243.6162629977418 , 99.4166108753398 , 224.4025374656094 , 280.2188396960704 , 388.30071572732413 , 303.6606254708068 , 357.65010556175076 , 329.9683522635635 , 411.0425718490149 , 366.4699850975501 , 262.26967297497686 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 597.2826086956521, 597.2826086956521, 728.643216080402, 549.5750708215297, 549.5750708215297, 612.9032258064516, 578.0730897009967, 539.5095367847412, 539.5095367847412, 700, 700, 591.3978494623656, 561.25, 528.1761006289308, 589.4670050761422, 600, 600, 511.9453924914676, 526.8817204301075, 409.2039800995025, 409.2039800995025, 409.2039800995025, 409.2039800995025, 356.34743875278394, 385.48387096774195, 354.09348441926346, 324.59425717852685, 309.1666666666667, 324.59425717852685, 90, 186.4831038798498, 328.5077951002227, 310.92436974789916, 385.48387096774195, 328.5077951002227, 405, 413.30645161290323, 415, 257.99793601651186 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Emskirchen', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });