Einige Anpassungen am Dashboard. Region Ansicht.

This commit is contained in:
Giò Diani committed 2025-01-13 17:06:54 +01:00
1 parent a3121bf58e
commit ebcd647a2f
9 files changed
+306 -67

No files matched your search

+83 -10
View File
@@ -17,9 +17,15 @@
<article style="grid-area: timeline;">
<div id="timeline"></div>
</article>
<article class="header" style="grid-area: chart6;">
<header>
<h2 id="prediction-title">Auslastung Vorhersage</h2>
</header>
<div id="chart-prediction"></div>
</article>
<article class="header" style="grid-area: chart1;">
<header>
<h2 id="belegung-title"></h2>
<h2 id="belegung-title">Gesamtauslastung</h2>
</header>
<div id="chart-heatmap"></div>
</article>
@@ -58,7 +64,7 @@
const sharedOptions = {
basic: {
color: ['#f1eef6','#bdc9e1','#74a9cf','#2b8cbe','#045a8d'],
color: ['#9ecae1','#6baed6','#4292c6','#2171b5','#084594'],
grid: {
top: 20,
left: 60,
@@ -134,22 +140,90 @@ const cCapacityOptions = {
cCapacity.setOption(cCapacityOptions);
const chartPrediction = document.getElementById('chart-prediction');
const cPrediction = echarts.init(chartPrediction);
const cPredictionOptions = {
legend: {
data: ['Moving Average', 'Earlier', 'Later']
},
tooltip: {
trigger: 'axis',
valueFormatter: (value) => value.toFixed(2)+' %'
},
grid: {
top: 20,
left: 25,
right: 10,
bottom: 20,
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: {!! json_encode($prediction['dates']) !!},
name: 'Zeitpunkt Scraping',
nameLocation: 'center',
nameGap: 24,
nameTextStyle: {
fontWeight: 'bold',
}
},
yAxis: {
type: 'value',
min: 0,
max: 1,
name: 'Auslastung in Prozent',
nameLocation: 'center',
nameGap: 38,
nameTextStyle: {
fontWeight: 'bold',
}
},
series: [{
name: 'Moving Average',
type: 'line',
symbolSize: 7,
data: {!! json_encode($prediction['movAvg']) !!}
},
{
name: 'Earlier',
type: 'line',
symbolSize: 7,
data: {!! json_encode($prediction['cap_earlierTimeframe']) !!}
},
{
name: 'Later',
type: 'line',
symbolSize: 7,
data: {!! json_encode($prediction['cap_laterTimeframe']) !!}
}]
};
cPrediction.setOption(cPredictionOptions);
const chartHeatmap = document.getElementById('chart-heatmap');
const cHeatmap = echarts.init(chartHeatmap);
const cHeatmapOptions = {
animation: false,
tooltip: {
position: 'top'
},
grid: {
top: 30,
right: 0,
bottom: 0,
left: 0
right: 45,
bottom: 50,
left: 5
},
dataZoom: [{
type: 'inside'
}
],
type: 'slider'
},
{
type: 'slider',
show: true,
yAxisIndex: 0,
}],
xAxis: {
show: false,
name: 'Kurzzeitmietobjekt',
@@ -196,8 +270,7 @@ const cHeatmapOptions = {
},
tooltip: {
formatter: (data) => {
let v = data.value
return `Kurzzeitmietobjekte-ID: ${data.name}<br />Datum Scraping: ${extractionDates[v[1]]}<br/>Auslastung: ${v[2]} %`
return `Kurzzeitmietobjekte-ID: ${data.data[1]}<br />Datum Scraping: ${data.data[0]}<br/>Auslastung: ${data.data[2].toFixed(2)} %`
},
},
emphasis: {