'; 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/murg/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 , 10 , 4 , 0 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 2 , 6 , 7 , 3 ]; 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', 'Juni 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: [ 335.3410928368848 , 271.9365998735421 , 340.04435890239273 , 328.83560269708573 , 344.53242333679617 , 380.5125952806692 , 402.7068211555071 , 383.36991277616374 , 452.9414156641875 , 342.9629253827188 , 342.9629253827188 , 243.54649711471654 , 234.82477952717593 , 377.5214270858343 , 351.7277629967916 , 268.7234946913435 , 288.0752741330242 , 295.2005216520891 , 304.6687374695159 , 302.1597112389769 , 302.1597112389769 , 662.9110462211213 , 263.98407967513435 , 316.1874890167546 , 266.1340790571899 , 320.77131140919056 , 299.5760476527266 , 295.5602673925482 , 291.0083872363698 , 342.30969043944714 , 347.03648076703234 , 344.4412035460725 , 341.613654156105 , 288.85619908925645 , 331.43504223832474 , 339.6282638130858 , 343.7444837846861 , 313.82559227250806 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 337.38191632928476, 219, 234.7305389221557, 507.61421319796955, 426.03550295857985, 507.61421319796955, 507.61421319796955, 355.07783543365457, 512.4450951683748, 355.07783543365457, 355.07783543365457, 197.28729963008632, 166.58378915962209, 299.2481203007519, 299.2481203007519, 197.28729963008632, 240.3846153846154, 240.3846153846154, 240.3846153846154, 358.2608695652174, 358.2608695652174, 441.6666666666667, 299, 358.2608695652174, 259.45144551519644, 358.2608695652174, 299, 299, 267.4418604651163, 377.77777777777777, 377.77777777777777, 377.77777777777777, 348.14814814814815, 303.030303030303, 350, 370.7865168539326, 350, 303.030303030303 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Murg', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });