'; 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/sassnitz/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 , 8 , 4 , 1 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 0 , 8 , 0 , 1 , 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', 'Juni 2024', 'Sept. 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: [ 241.99576142102845 , 270.4675760284369 , 572.8040828637238 , 626.5257493761661 , 644.6481195609715 , 237.55651115661712 , 467.37760043749375 , 521.500400434071 , 381.4080240456973 , 580.0418403821876 , 580.0418403821876 , 563.0783443020489 , 525.805758311881 , 505.7583218816781 , 524.6379677922276 , 348.8830722110432 , 333.84886627013356 , 290.16015106348635 , 299.8552363236081 , 275.037820957761 , 265.34467925318216 , 241.95079913495644 , 259.281224985435 , 270.189431142501 , 257.4937573115679 , 269.3101569392468 , 267.89970889188425 , 273.1718511420521 , 313.44476824145585 , 196.5917354632962 , 319.4550903662439 , 302.6896217695409 , 217.75433817335866 , 219.1635683759603 , 216.310303330034 , 293.2236216230779 , 319.2447312613476 , 337.9657483444885 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 250.76923076923077, 326.18825722274, 774.7933884297521, 675.6756756756756, 774.7933884297521, 186.28095551172476, 507.3280721533258, 633.7579617834394, 497.5, 633.7579617834394, 633.7579617834394, 633.7579617834394, 633.7579617834394, 633.7579617834394, 633.7579617834394, 293.0780559646539, 293.0780559646539, 293.0780559646539, 402.7027027027027, 310.0338218714769, 310.0338218714769, 269.2307692307692, 300, 310.0338218714769, 300.8241758241758, 300, 269.2307692307692, 300, 253.6640360766629, 204.22535211267606, 274.22303473491775, 274.22303473491775, 245.6140350877193, 202.93122886133034, 202.93122886133034, 274.22303473491775, 274.22303473491775, 454.2857142857143 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Sassnitz', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });