'; 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/jena/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 , 10 , 7 , 4 , 2 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 4 , 1 , 2 , 8 , 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', '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', 'Mai 2024', 'Juni 2024', 'Juli 2024', 'Aug. 2024', 'Sept. 2024', 'Okt. 2024', 'Nov. 2024', 'Dez. 2024', 'Jan. 2025', 'Feb. 2025', 'März 2025' ], datasets: [ { label: " €/m² im Durchschnitt", borderColor: "#0b4b82", backgroundColor: "#0b4b82", tension: 0.3, data: [ 145.59601667045376 , 165.61944559581332 , 124.09104715317254 , 186.8303664673889 , 191.34077506512452 , 229.47580282402492 , 190.78241331896726 , 121.26246559088673 , 146.1362729696602 , 146.1362729696602 , 187.8214755949209 , 235.1642871109219 , 243.4068105415621 , 152.98767852969544 , 228.71597225452524 , 197.42632171545955 , 204.38773836661323 , 201.71070537663553 , 293.54336894398904 , 351.2362669624696 , 413.27519041635077 , 356.9225764440972 , 399.6007959302432 , 452.15281214725206 , 458.7903600434865 , 355.69263434902933 , 431.08586938120817 , 488.71597599847837 , 562.7130110668306 , 390.3836048711564 , 417.9345911245306 , 177.0399450483627 , 212.99859755642206 , 96.3195389015808 , 86.32563172797593 , 160.66115756700177 , 121.61190563963274 , 121.61190563963274 , 276.9243730202456 , 226.51472916235923 , 296.4950643479541 , 397.6872811160122 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 142.36902050113895, 64.57925636007828, 58.25242718446602, 142.36902050113895, 142.36902050113895, 139, 139, 91, 75.12248230811105, 75.12248230811105, 230, 272.9766803840878, 272.9766803840878, 91, 257.45257452574526, 230, 257.45257452574526, 185.11627906976744, 294.90333919156416, 350, 366.9882100750268, 294.90333919156416, 355.5239534263621, 366.9882100750268, 387.42857142857144, 353.3333333333333, 374.35777777777776, 380.95238095238096, 640, 355.5239534263621, 374.35777777777776, 129, 129, 90.47619047619048, 82.3271130625686, 92.47027741083224, 92.13759213759214, 92.13759213759214, 267.02508960573476, 92.47842170160295, 300, 374.35777777777776 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Jena', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });