Überarbeitung Dashboard

This commit is contained in:
Giò Diani committed 2025-01-14 22:11:31 +01:00
1 parent 8bef4b9621
commit a5a21fb925
10 files changed
+242 -95

No files matched your search

+22 -4
View File
@@ -32,7 +32,7 @@
<article class="header" style="grid-area: chart3;">
<header>
<h2>
Auslastung nach Monat am 2024-04-15T07:06:22
Auslastung der Region nach Monat am <span class="date">{{ $startDate }}</span>
</h2>
</header>
<div id="chart-capacity-monthly">
@@ -54,7 +54,7 @@
<article class="header" style="grid-area: chart4;">
<header>
<h2>
Auslastung Tage für Monat
Auslastung der Region nach Wochentage am <span class="date">{{ $startDate }}</span>
</h2>
</header>
<div id="chart-capacity-daily">
@@ -64,7 +64,7 @@
const sharedOptions = {
basic: {
color: ['#9ecae1','#6baed6','#4292c6','#2171b5','#084594'],
color: {!! $chartOptions['colors'] !!},
grid: {
top: 20,
left: 60,
@@ -95,6 +95,7 @@ const cCapacityOptions = {
trigger: 'axis',
valueFormatter: (value) => value.toFixed(2)+' %'
},
color: sharedOptions.basic.color,
grid: {
top: 20,
left: 25,
@@ -134,7 +135,7 @@ const cCapacityOptions = {
name: 'Auslastung Region',
type: 'line',
symbolSize: 7,
data: {!! json_encode($regionCapacities['all']['capacities']) !!}
data: {!! json_encode($regionCapacities['region']['capacities']) !!}
}]
};
@@ -170,6 +171,9 @@ const cCapacityMonthlyOptions = {
},
series: [{
type: 'bar',
itemStyle: {
color: sharedOptions.basic.color[3]
},
data: {!! json_encode($m['capacities']) !!}
}]
},
@@ -209,6 +213,9 @@ const cCapacityDailyOptions = {
},
series: [{
type: 'bar',
itemStyle: {
color: sharedOptions.basic.color[3]
},
data: {!! json_encode($d['capacities']) !!}
}]
},
@@ -284,6 +291,7 @@ const cPredictionOptions = {
},
@else
{
color: sharedOptions.basic.color,
graphic: {
elements: []
},
@@ -424,6 +432,11 @@ cTimeline.setOption(cTimelineOptions);
cTimeline.on('timelinechanged', (e) => {
let dateTitles = document.querySelectorAll('span.date');
dateTitles.forEach(el => {
el.innerText = cTimelineOptions.timeline.data[e.currentIndex];
});
// Set markpoint on linechart
let x = cCapacityOptions.xAxis.data[e.currentIndex];
let y = cCapacityOptions.series[0].data[e.currentIndex];
@@ -464,5 +477,10 @@ cCapacity.on('click', 'series', (e) => {
});
});
cHeatmap.on('click', 'series', (e) => {
window.open(`/property/${e.value[1]}?date=${e.value[0]}`, '_self');
})
</script>
@endsection