'; 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/hoechberg/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 , 2 , 6 , 4 , 1 ]; qmPriceChartData.labels = [ "0 € / m² - 100 € / m²" , "100 € / m² - 200 € / m²" , "200 € / m² - 300 € / m²" , "300 € / m² - 400 € / m²" , "400 € / m²+" ]; qmPriceChartData.data = [ 4 , 0 , 0 , 2 , 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', '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', '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: [ 194.41333400320113 , 213.33486044129165 , 183.35954181771734 , 180.3004496907245 , 180.3004496907245 , 274.91874004848444 , 369.03228547721926 , 435.539871973578 , 214.96357472951559 , 421.3289948109629 , 421.3289948109629 , 377.2211504205532 , 284.50420574308265 , 342.68568756079867 , 349.5564276333133 , 439.37866986281244 , 438.0930299591198 , 297.35811547467523 , 274.6150407631712 , 465.0849231587753 , 407.03204989846887 , 587.1338002521518 , 556.5674645498108 , 523.1360335978792 , 721.73431817606 , 524.1086609329119 , 517.3906997673963 , 439.09226128090233 , 561.9154257822282 , 689.3183568799702 , 626.6537994959612 , 606.3715519390787 , 502.10857144041864 , 605.2520252028189 , 606.0632476046451 , 580.5128526618976 , 715.715537569046 , 670.8830211999879 , 520.4482500596106 , 347.57816080300785 , 346.7177054515524 ], yAxisID: 'y', }, { label: " €/m² Median", borderColor: "#76b4e8", backgroundColor: "#76b4e8", tension: 0.3, type: 'line', data: [ 166.66666666666666, 166.66666666666666, 124.30011198208287, 124.30011198208287, 124.30011198208287, 99.73404255319149, 272.5806451612903, 272.5806451612903, 179.33130699088147, 290.1818181818182, 290.1818181818182, 219.8173824822455, 219.8173824822455, 263.90845070422534, 279.06976744186045, 396.011396011396, 396.011396011396, 253.84615384615384, 227.27272727272728, 450, 390, 434.5238095238095, 415.4761904761905, 469.6673189823875, 545.1154529307282, 486.27450980392155, 450, 390.1705115346038, 595.4653937947494, 735.0157728706624, 626.2626262626262, 626.2626262626262, 560.6060606060606, 608.4656084656085, 606.9364161849711, 606.9364161849711, 606.9364161849711, 606.9364161849711, 580.8080808080808, 505.78034682080926, 462.0689655172414 ], } ] }, options: { legend: {display: true}, title: { display: true, text: 'Entwicklung der Quadratmeterpreise in Höchberg', fontSize: 16, fontStyle: "normal", fontFamily: "'Open Sans',sans-serif" } } }); });