2025-01-12 20:55:46 +01:00
|
|
|
|
@extends('base')
|
|
|
|
|
@section('body-class', 'region')
|
|
|
|
|
@section('header')
|
|
|
|
|
<nav>
|
2025-01-18 17:31:31 +01:00
|
|
|
|
<strong>{{ $region['name'] }}</strong>
|
2025-01-12 20:55:46 +01:00
|
|
|
|
<ul>
|
|
|
|
|
<li><a href="/">Start</a></li>
|
|
|
|
|
@foreach($regions as $r)
|
2025-01-17 23:46:22 +01:00
|
|
|
|
@if($r['id'] != $regionId)
|
|
|
|
|
<li><a href="/region/{{ $r['id'] }}">{{ $r['name'] }}</a></li>
|
2025-01-12 20:55:46 +01:00
|
|
|
|
@endif
|
|
|
|
|
@endforeach
|
|
|
|
|
</ul>
|
|
|
|
|
</nav>
|
|
|
|
|
@endsection
|
|
|
|
|
@section('main')
|
|
|
|
|
<article style="grid-area: timeline;">
|
|
|
|
|
<div id="timeline"></div>
|
|
|
|
|
</article>
|
2025-01-13 17:06:54 +01:00
|
|
|
|
<article class="header" style="grid-area: chart6;">
|
|
|
|
|
<header>
|
2025-01-17 13:49:43 +01:00
|
|
|
|
<h2 id="prediction-title">Gleitender Mittelwert für die Verfügbarkeit der Region</h2>
|
2025-01-19 12:42:04 +01:00
|
|
|
|
<button popovertarget="chart-prediction-popover"></button>
|
|
|
|
|
<div id="chart-prediction-popover" popover>
|
|
|
|
|
<h2>Gleitender Mittelwert für die Verfügbarkeit der Region</h2>
|
|
|
|
|
<p>Das Diagramm...</p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>X-Achse: Zeitpunkt der Beobachtung</li>
|
|
|
|
|
<li>Y-Achse: Verfügbarkeit einer Region. 0% = Alle Mietobjekte der Region sind komplett ausgebucht; 100% = Alle Mietobjekte der Region können zu allen verfügbaren Daten gebucht werden. </li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2025-01-13 17:06:54 +01:00
|
|
|
|
</header>
|
|
|
|
|
<div id="chart-prediction"></div>
|
|
|
|
|
</article>
|
2025-01-12 20:55:46 +01:00
|
|
|
|
<article class="header" style="grid-area: chart1;">
|
|
|
|
|
<header>
|
2025-01-19 12:42:04 +01:00
|
|
|
|
<h2 id="belegung-title">Verfügbarkeit aller Mietobjekte der Region über gesamten beobachteten Zeitraum</h2>
|
|
|
|
|
<button popovertarget="popup-heat"></button><div popover id="popup-heat">
|
|
|
|
|
<h2>Verfügbarkeit aller Mietobjekte der Region über gesamten beobachteten Zeitraum</h2>
|
|
|
|
|
<p>
|
|
|
|
|
Das Diagramm zeigt die Verfügbarkeit aller Mietobjekte der Region zu allen beobachteten Zeitpunkten.
|
|
|
|
|
</p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>X-Achse: Zeitpunkt Beobachtung.</li>
|
|
|
|
|
<li>Y-Achse: Mietobjekte.</li>
|
|
|
|
|
<li>Kategorien: 0% = Das Mietobjekt ist komplett Ausgebucht; 100% = Das Mietobjekt kann zu allen Verfügbaren Daten gebucht werden.</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h3>Berrechnung Verfügbarkeit</h3>
|
|
|
|
|
<p>Die Verfügbarkeit eines Mietobjekt errechnet sich folgendermassen:</p>
|
|
|
|
|
<p class="formula">
|
|
|
|
|
Verfügbarkeit = (100 / (Anzahl Buchungsdaten * 2)) * Summe Status
|
|
|
|
|
</p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>Status: Jeder verfügbare Kalendertag kann den Status «Nicht Verfügbar» (0), «Verfügbar (kein Anreisetag)» (1) oder «Verfügbar» (2) aufweisen.</li>
|
|
|
|
|
<li>Anzahl Buchungsdaten: Die Summe aller angebotenen Buchungsdaten mit zwei multipliziert (= Alle Buchungdaten haben den Status «Verfügbar»)</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
2025-01-12 20:55:46 +01:00
|
|
|
|
</header>
|
|
|
|
|
<div id="chart-heatmap"></div>
|
|
|
|
|
</article>
|
|
|
|
|
<article class="header" style="grid-area: chart3;">
|
|
|
|
|
<header>
|
|
|
|
|
<h2>
|
2025-01-19 12:42:04 +01:00
|
|
|
|
Verfügbarkeit nach Monat am <span class="date">{{ $startDate }}</span>
|
2025-01-12 20:55:46 +01:00
|
|
|
|
</h2>
|
|
|
|
|
</header>
|
|
|
|
|
<div id="chart-capacity-monthly">
|
|
|
|
|
</div>
|
|
|
|
|
</article>
|
|
|
|
|
<article class="header" style="grid-area: chart2;">
|
|
|
|
|
<header>
|
|
|
|
|
<h2>
|
2025-01-17 13:49:43 +01:00
|
|
|
|
Entwicklung der Verfügbarkeit
|
2025-01-12 20:55:46 +01:00
|
|
|
|
</h2>
|
|
|
|
|
<button popovertarget="chart-capacity-popover"></button>
|
|
|
|
|
<div id="chart-capacity-popover" popover>
|
2025-01-19 12:42:04 +01:00
|
|
|
|
<h2>Entwicklung der Verfügbarkeit</h2>
|
|
|
|
|
<p>Das Liniendiagramm zeigt die Entwicklung Verfügbarkeit der Region im Vergleich zu allen Regionen an.</p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>X-Achse: Zeitpunkt der Beobachtung</li>
|
|
|
|
|
<li>Y-Achse: Verfügbarkeit einer Region. 0% = Alle Mietobjekte der Region sind komplett ausgebucht; 100% = Alle Mietobjekte der Region können zu allen verfügbaren Daten gebucht werden. </li>
|
|
|
|
|
</ul>
|
2025-01-12 20:55:46 +01:00
|
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
<div id="chart-capacity"></div>
|
|
|
|
|
</article>
|
|
|
|
|
<article class="header" style="grid-area: chart4;">
|
|
|
|
|
<header>
|
|
|
|
|
<h2>
|
2025-01-19 12:42:04 +01:00
|
|
|
|
Verfügbarkeit nach Wochentage am <span class="date">{{ $startDate }}</span>
|
2025-01-12 20:55:46 +01:00
|
|
|
|
</h2>
|
|
|
|
|
</header>
|
|
|
|
|
<div id="chart-capacity-daily">
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
|
|
<script type="module">
|
|
|
|
|
|
|
|
|
|
const sharedOptions = {
|
|
|
|
|
basic: {
|
2025-01-17 23:46:22 +01:00
|
|
|
|
color: {!! $diagramsOptions['shared']['colors'] !!},
|
2025-01-12 20:55:46 +01:00
|
|
|
|
grid: {
|
|
|
|
|
top: 20,
|
|
|
|
|
left: 60,
|
|
|
|
|
right: 0,
|
|
|
|
|
bottom: 50
|
|
|
|
|
},
|
2025-01-15 16:57:18 +01:00
|
|
|
|
tooltip: {
|
|
|
|
|
show: true,
|
|
|
|
|
trigger: 'axis',
|
2025-01-17 17:37:01 +01:00
|
|
|
|
valueFormatter: (value) => value == null ? 'N/A' : value.toFixed(2)+' %'
|
2025-01-15 16:57:18 +01:00
|
|
|
|
},
|
2025-01-12 20:55:46 +01:00
|
|
|
|
name: (opt) => {
|
|
|
|
|
return {
|
|
|
|
|
name: opt.name,
|
|
|
|
|
nameLocation: opt.location,
|
|
|
|
|
nameGap: 24,
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const chartCapacity = document.getElementById('chart-capacity');
|
|
|
|
|
const cCapacity = echarts.init(chartCapacity);
|
|
|
|
|
|
|
|
|
|
const cCapacityOptions = {
|
|
|
|
|
legend: {
|
2025-01-15 16:57:18 +01:00
|
|
|
|
show: true
|
2025-01-12 20:55:46 +01:00
|
|
|
|
},
|
2025-01-15 16:57:18 +01:00
|
|
|
|
tooltip: sharedOptions.basic.tooltip,
|
2025-01-14 22:11:31 +01:00
|
|
|
|
color: sharedOptions.basic.color,
|
2025-01-12 20:55:46 +01:00
|
|
|
|
grid: {
|
|
|
|
|
top: 20,
|
|
|
|
|
left: 25,
|
|
|
|
|
right: 10,
|
|
|
|
|
bottom: 20,
|
|
|
|
|
containLabel: true
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
boundaryGap: false,
|
2025-01-17 23:46:22 +01:00
|
|
|
|
data: {!! $diagramsOptions['capacity']['xAxis']['data'] !!},
|
2025-01-19 12:42:04 +01:00
|
|
|
|
name: 'Zeitpunkt Beobachtung',
|
2025-01-12 20:55:46 +01:00
|
|
|
|
nameLocation: 'center',
|
|
|
|
|
nameGap: 24,
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'value',
|
|
|
|
|
min: 0,
|
|
|
|
|
max: 100,
|
2025-01-17 13:49:43 +01:00
|
|
|
|
name: 'Verfügbarkeit in %',
|
2025-01-12 20:55:46 +01:00
|
|
|
|
nameLocation: 'center',
|
|
|
|
|
nameGap: 38,
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
series: [{
|
2025-01-17 13:49:43 +01:00
|
|
|
|
name: 'Verfügbarkeit alle Regionen',
|
2025-01-12 20:55:46 +01:00
|
|
|
|
type: 'line',
|
|
|
|
|
symbolSize: 7,
|
2025-01-17 23:46:22 +01:00
|
|
|
|
data: {!! $diagramsOptions['capacity']['series']['all']['data'] !!}
|
2025-01-12 20:55:46 +01:00
|
|
|
|
},
|
|
|
|
|
{
|
2025-01-17 13:49:43 +01:00
|
|
|
|
name: 'Verfügbarkeit Region',
|
2025-01-12 20:55:46 +01:00
|
|
|
|
type: 'line',
|
|
|
|
|
symbolSize: 7,
|
2025-01-17 23:46:22 +01:00
|
|
|
|
data: {!! $diagramsOptions['capacity']['series']['region']['data'] !!}
|
2025-01-12 20:55:46 +01:00
|
|
|
|
}]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cCapacity.setOption(cCapacityOptions);
|
|
|
|
|
|
2025-01-13 22:50:03 +01:00
|
|
|
|
const chartCapacityMonthly = document.getElementById('chart-capacity-monthly');
|
|
|
|
|
const cCapacityMonthly = echarts.init(chartCapacityMonthly);
|
|
|
|
|
|
|
|
|
|
const cCapacityMonthlyOptions = {
|
|
|
|
|
timeline: {
|
|
|
|
|
show: false,
|
2025-01-17 23:46:22 +01:00
|
|
|
|
data: {!! $diagramsOptions['capacity']['xAxis']['data'] !!},
|
2025-01-13 22:50:03 +01:00
|
|
|
|
axisType: 'time',
|
|
|
|
|
},
|
|
|
|
|
grid: {
|
2025-01-15 16:57:18 +01:00
|
|
|
|
top: 5,
|
|
|
|
|
bottom: 40,
|
2025-01-13 22:50:03 +01:00
|
|
|
|
left: 70,
|
|
|
|
|
right: 10
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'value',
|
2025-01-15 16:57:18 +01:00
|
|
|
|
max: 100,
|
2025-01-17 13:49:43 +01:00
|
|
|
|
name: 'Verfügbarkeit in %',
|
2025-01-15 16:57:18 +01:00
|
|
|
|
nameLocation: 'center',
|
|
|
|
|
nameGap: 25,
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
}
|
2025-01-13 22:50:03 +01:00
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
},
|
2025-01-15 16:57:18 +01:00
|
|
|
|
tooltip: sharedOptions.basic.tooltip,
|
2025-01-13 22:50:03 +01:00
|
|
|
|
options: [
|
2025-01-17 23:46:22 +01:00
|
|
|
|
@foreach ($diagramsOptions['capacityMonthly']['options'] as $m)
|
2025-01-13 22:50:03 +01:00
|
|
|
|
{
|
|
|
|
|
yAxis: {
|
|
|
|
|
data: {!! json_encode($m['months']) !!}
|
|
|
|
|
},
|
|
|
|
|
series: [{
|
|
|
|
|
type: 'bar',
|
2025-01-14 22:11:31 +01:00
|
|
|
|
itemStyle: {
|
|
|
|
|
color: sharedOptions.basic.color[3]
|
|
|
|
|
},
|
2025-01-13 22:50:03 +01:00
|
|
|
|
data: {!! json_encode($m['capacities']) !!}
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
@endforeach
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cCapacityMonthly.setOption(cCapacityMonthlyOptions);
|
|
|
|
|
|
|
|
|
|
const chartCapacityDaily = document.getElementById('chart-capacity-daily');
|
|
|
|
|
const cCapacityDaily = echarts.init(chartCapacityDaily);
|
|
|
|
|
|
|
|
|
|
const cCapacityDailyOptions = {
|
|
|
|
|
timeline: {
|
|
|
|
|
show: false,
|
2025-01-17 23:46:22 +01:00
|
|
|
|
data: {!! $diagramsOptions['capacity']['xAxis']['data'] !!},
|
2025-01-13 22:50:03 +01:00
|
|
|
|
axisType: 'time',
|
|
|
|
|
},
|
2025-01-15 16:57:18 +01:00
|
|
|
|
tooltip: sharedOptions.basic.tooltip,
|
2025-01-13 22:50:03 +01:00
|
|
|
|
grid: {
|
2025-01-15 16:57:18 +01:00
|
|
|
|
top: 5,
|
|
|
|
|
bottom: 40,
|
2025-01-13 22:50:03 +01:00
|
|
|
|
left: 70,
|
|
|
|
|
right: 10
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'value',
|
2025-01-15 16:57:18 +01:00
|
|
|
|
max: 100,
|
2025-01-17 13:49:43 +01:00
|
|
|
|
name: 'Verfügbarkeit in %',
|
2025-01-15 16:57:18 +01:00
|
|
|
|
nameLocation: 'center',
|
|
|
|
|
nameGap: 25,
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
}
|
2025-01-13 22:50:03 +01:00
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
},
|
|
|
|
|
options: [
|
2025-01-17 23:46:22 +01:00
|
|
|
|
@foreach ($diagramsOptions['capacityDaily']['options'] as $d)
|
2025-01-13 22:50:03 +01:00
|
|
|
|
{
|
|
|
|
|
yAxis: {
|
|
|
|
|
data: {!! json_encode($d['weekdays']) !!}
|
|
|
|
|
},
|
|
|
|
|
series: [{
|
|
|
|
|
type: 'bar',
|
2025-01-14 22:11:31 +01:00
|
|
|
|
itemStyle: {
|
|
|
|
|
color: sharedOptions.basic.color[3]
|
|
|
|
|
},
|
2025-01-13 22:50:03 +01:00
|
|
|
|
data: {!! json_encode($d['capacities']) !!}
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
@endforeach
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cCapacityDaily.setOption(cCapacityDailyOptions);
|
|
|
|
|
|
2025-01-13 17:06:54 +01:00
|
|
|
|
const chartPrediction = document.getElementById('chart-prediction');
|
|
|
|
|
const cPrediction = echarts.init(chartPrediction);
|
|
|
|
|
|
|
|
|
|
const cPredictionOptions = {
|
2025-01-19 12:42:04 +01:00
|
|
|
|
color: [sharedOptions.basic.color[0], sharedOptions.basic.color[4], sharedOptions.basic.color[5]],
|
2025-01-13 22:50:03 +01:00
|
|
|
|
timeline: {
|
|
|
|
|
show: false,
|
2025-01-17 23:46:22 +01:00
|
|
|
|
data: {!! $diagramsOptions['capacity']['xAxis']['data'] !!},
|
2025-01-13 22:50:03 +01:00
|
|
|
|
axisType: 'time',
|
|
|
|
|
replaceMerge: ['graphic', 'series']
|
|
|
|
|
},
|
2025-01-13 17:06:54 +01:00
|
|
|
|
legend: {
|
2025-01-13 22:50:03 +01:00
|
|
|
|
show: true
|
2025-01-13 17:06:54 +01:00
|
|
|
|
},
|
2025-01-15 16:57:18 +01:00
|
|
|
|
tooltip: sharedOptions.basic.tooltip,
|
2025-01-13 17:06:54 +01:00
|
|
|
|
grid: {
|
|
|
|
|
top: 20,
|
|
|
|
|
left: 25,
|
|
|
|
|
right: 10,
|
|
|
|
|
bottom: 20,
|
|
|
|
|
containLabel: true
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
boundaryGap: false,
|
2025-01-19 12:42:04 +01:00
|
|
|
|
name: 'Zeitpunkt Beobachtung',
|
2025-01-13 17:06:54 +01:00
|
|
|
|
nameLocation: 'center',
|
|
|
|
|
nameGap: 24,
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
fontWeight: 'bold',
|
2025-01-13 22:50:03 +01:00
|
|
|
|
},
|
2025-01-13 17:06:54 +01:00
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
type: 'value',
|
|
|
|
|
min: 0,
|
2025-01-13 22:50:03 +01:00
|
|
|
|
max: 100,
|
2025-01-17 13:49:43 +01:00
|
|
|
|
name: 'Verfügbarkeit in %',
|
2025-01-13 17:06:54 +01:00
|
|
|
|
nameLocation: 'center',
|
|
|
|
|
nameGap: 38,
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
}
|
|
|
|
|
},
|
2025-01-13 22:50:03 +01:00
|
|
|
|
options: [
|
2025-01-17 23:46:22 +01:00
|
|
|
|
@foreach ($diagramsOptions['predictions']['options'] as $p)
|
2025-01-13 22:50:03 +01:00
|
|
|
|
@if($p === null)
|
|
|
|
|
{
|
|
|
|
|
graphic: {
|
|
|
|
|
elements: [
|
|
|
|
|
{
|
|
|
|
|
type: 'text',
|
|
|
|
|
left: 'center',
|
|
|
|
|
top: 'center',
|
|
|
|
|
style: {
|
|
|
|
|
text: 'Keine Daten für Zeitspanne',
|
|
|
|
|
fontSize: 44,
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
2025-01-13 17:06:54 +01:00
|
|
|
|
},
|
2025-01-13 22:50:03 +01:00
|
|
|
|
@else
|
2025-01-13 17:06:54 +01:00
|
|
|
|
{
|
2025-01-14 22:11:31 +01:00
|
|
|
|
color: sharedOptions.basic.color,
|
2025-01-13 22:50:03 +01:00
|
|
|
|
graphic: {
|
|
|
|
|
elements: []
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
data: {!! json_encode($p['dates']) !!}
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
name: 'Gleitender Mittelwert',
|
2025-01-19 12:42:04 +01:00
|
|
|
|
showSymbol: false,
|
|
|
|
|
connectNulls: true,
|
2025-01-13 22:50:03 +01:00
|
|
|
|
type: 'line',
|
|
|
|
|
symbolSize: 7,
|
2025-01-18 17:31:31 +01:00
|
|
|
|
data: {!! json_encode($p['capacities_moving_average']) !!}
|
2025-01-13 22:50:03 +01:00
|
|
|
|
},
|
|
|
|
|
{
|
2025-01-17 12:51:45 +01:00
|
|
|
|
name: 'Ausgangsdaten',
|
2025-01-19 12:42:04 +01:00
|
|
|
|
showSymbol: false,
|
|
|
|
|
connectNulls: true,
|
2025-01-13 22:50:03 +01:00
|
|
|
|
type: 'line',
|
|
|
|
|
symbolSize: 7,
|
2025-01-18 17:31:31 +01:00
|
|
|
|
data: {!! json_encode($p['capacities_timeframe_before']) !!}
|
2025-01-13 22:50:03 +01:00
|
|
|
|
},
|
|
|
|
|
{
|
2025-01-17 12:51:45 +01:00
|
|
|
|
name: 'Vergleichsdaten',
|
2025-01-19 12:42:04 +01:00
|
|
|
|
showSymbol: false,
|
|
|
|
|
connectNulls: true,
|
2025-01-13 22:50:03 +01:00
|
|
|
|
type: 'line',
|
|
|
|
|
symbolSize: 7,
|
2025-01-18 17:31:31 +01:00
|
|
|
|
data: {!! json_encode($p['capacities_timeframe_after']) !!}
|
2025-01-13 22:50:03 +01:00
|
|
|
|
}
|
|
|
|
|
]
|
2025-01-13 17:06:54 +01:00
|
|
|
|
},
|
2025-01-13 22:50:03 +01:00
|
|
|
|
@endif
|
|
|
|
|
@endforeach
|
|
|
|
|
]
|
2025-01-13 17:06:54 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cPrediction.setOption(cPredictionOptions);
|
|
|
|
|
|
2025-01-12 20:55:46 +01:00
|
|
|
|
const chartHeatmap = document.getElementById('chart-heatmap');
|
|
|
|
|
const cHeatmap = echarts.init(chartHeatmap);
|
|
|
|
|
const cHeatmapOptions = {
|
2025-01-13 17:06:54 +01:00
|
|
|
|
animation: false,
|
2025-01-12 20:55:46 +01:00
|
|
|
|
tooltip: {
|
|
|
|
|
position: 'top'
|
|
|
|
|
},
|
|
|
|
|
grid: {
|
2025-01-17 13:02:54 +01:00
|
|
|
|
show: true,
|
|
|
|
|
borderWidth: 1,
|
|
|
|
|
borderColor: '#aaa',
|
2025-01-12 20:55:46 +01:00
|
|
|
|
top: 30,
|
2025-01-13 17:06:54 +01:00
|
|
|
|
right: 45,
|
2025-01-17 13:22:05 +01:00
|
|
|
|
bottom: 70,
|
|
|
|
|
left: 30
|
2025-01-12 20:55:46 +01:00
|
|
|
|
},
|
|
|
|
|
dataZoom: [{
|
2025-01-13 17:06:54 +01:00
|
|
|
|
type: 'slider'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: 'slider',
|
|
|
|
|
show: true,
|
|
|
|
|
yAxisIndex: 0,
|
|
|
|
|
}],
|
2025-01-12 20:55:46 +01:00
|
|
|
|
xAxis: {
|
2025-01-17 13:22:05 +01:00
|
|
|
|
show: true,
|
2025-01-19 12:42:04 +01:00
|
|
|
|
name: 'Zeitpunkt Beobachtung',
|
2025-01-12 20:55:46 +01:00
|
|
|
|
type: 'category',
|
2025-01-17 23:46:22 +01:00
|
|
|
|
data: {!! $diagramsOptions['heatmap']['xAxis']['data'] !!},
|
2025-01-12 20:55:46 +01:00
|
|
|
|
splitArea: {
|
|
|
|
|
show: false
|
|
|
|
|
},
|
2025-01-17 13:22:05 +01:00
|
|
|
|
splitArea: {
|
|
|
|
|
show: false
|
|
|
|
|
},
|
2025-01-12 20:55:46 +01:00
|
|
|
|
axisLabel: {
|
2025-01-17 13:22:05 +01:00
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
axisTick: {
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
axisLine: {
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
nameLocation: 'center',
|
|
|
|
|
nameGap: 10,
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
fontWeight: 'bold',
|
2025-01-12 20:55:46 +01:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
2025-01-17 13:22:05 +01:00
|
|
|
|
show: true,
|
2025-01-12 20:55:46 +01:00
|
|
|
|
type: 'category',
|
2025-01-17 23:46:22 +01:00
|
|
|
|
data: {!! $diagramsOptions['heatmap']['yAxis']['data'] !!},
|
2025-01-12 20:55:46 +01:00
|
|
|
|
splitArea: {
|
2025-01-17 13:22:05 +01:00
|
|
|
|
show: false
|
|
|
|
|
},
|
|
|
|
|
axisTick: {
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
axisLine: {
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
axisLabel: {
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
name: 'Mietobjekte',
|
|
|
|
|
nameLocation: 'center',
|
|
|
|
|
nameGap: 10,
|
|
|
|
|
nameTextStyle: {
|
|
|
|
|
fontWeight: 'bold',
|
2025-01-12 20:55:46 +01:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
visualMap: {
|
|
|
|
|
type: 'piecewise',
|
|
|
|
|
min: 0,
|
|
|
|
|
max: 100,
|
|
|
|
|
calculable: true,
|
|
|
|
|
orient: 'horizontal',
|
|
|
|
|
left: 'center',
|
|
|
|
|
top: 0,
|
|
|
|
|
formatter: (v1, v2) => {
|
|
|
|
|
return `${v1} – ${v2} %`;
|
|
|
|
|
},
|
|
|
|
|
inRange: {
|
|
|
|
|
color: sharedOptions.basic.color,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
series: [
|
|
|
|
|
{
|
2025-01-17 13:49:43 +01:00
|
|
|
|
name: 'Verfügbarkeit',
|
2025-01-12 20:55:46 +01:00
|
|
|
|
type: 'heatmap',
|
|
|
|
|
blurSize: 0,
|
2025-01-18 17:31:31 +01:00
|
|
|
|
data: {!! $diagramsOptions['heatmap']['series']['data'] !!},
|
2025-01-12 20:55:46 +01:00
|
|
|
|
label: {
|
|
|
|
|
show: false
|
|
|
|
|
},
|
|
|
|
|
tooltip: {
|
|
|
|
|
formatter: (data) => {
|
2025-01-19 12:42:04 +01:00
|
|
|
|
return `Kurzzeitmietobjekte-ID: ${data.data[1]}<br />Beobachtungszeitpunkt: ${data.data[0]}<br/>Verfügbarkeit: ${data.data[2].toFixed(2)} %`
|
2025-01-12 20:55:46 +01:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
emphasis: {
|
|
|
|
|
itemStyle: {
|
|
|
|
|
borderColor: '#000',
|
|
|
|
|
borderWidth: 2
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cHeatmap.setOption(cHeatmapOptions);
|
2025-01-13 22:50:03 +01:00
|
|
|
|
|
|
|
|
|
const chartTimeline = document.getElementById('timeline');
|
|
|
|
|
const cTimeline = echarts.init(chartTimeline);
|
|
|
|
|
|
|
|
|
|
const cTimelineOptions = {
|
|
|
|
|
grid: {
|
|
|
|
|
show: false,
|
|
|
|
|
},
|
|
|
|
|
timeline: {
|
2025-01-17 23:46:22 +01:00
|
|
|
|
data: {!! $diagramsOptions['capacity']['xAxis']['data'] !!},
|
2025-01-13 22:50:03 +01:00
|
|
|
|
playInterval: 2000,
|
|
|
|
|
axisType: 'time',
|
|
|
|
|
left: 8,
|
|
|
|
|
right: 8,
|
|
|
|
|
bottom: 0,
|
|
|
|
|
label: {
|
|
|
|
|
show: false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cTimeline.setOption(cTimelineOptions);
|
|
|
|
|
|
|
|
|
|
cTimeline.on('timelinechanged', (e) => {
|
|
|
|
|
|
2025-01-14 22:11:31 +01:00
|
|
|
|
let dateTitles = document.querySelectorAll('span.date');
|
|
|
|
|
dateTitles.forEach(el => {
|
|
|
|
|
el.innerText = cTimelineOptions.timeline.data[e.currentIndex];
|
|
|
|
|
});
|
|
|
|
|
|
2025-01-13 22:50:03 +01:00
|
|
|
|
// Set markpoint on linechart
|
|
|
|
|
let x = cCapacityOptions.xAxis.data[e.currentIndex];
|
|
|
|
|
let y = cCapacityOptions.series[0].data[e.currentIndex];
|
|
|
|
|
|
|
|
|
|
cCapacityMonthly.dispatchAction({
|
|
|
|
|
type: 'timelineChange',
|
|
|
|
|
currentIndex: e.currentIndex
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
cCapacityDaily.dispatchAction({
|
|
|
|
|
type: 'timelineChange',
|
|
|
|
|
currentIndex: e.currentIndex
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
cPrediction.dispatchAction({
|
|
|
|
|
type: 'timelineChange',
|
|
|
|
|
currentIndex: e.currentIndex
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
cCapacity.setOption({
|
|
|
|
|
series: {
|
|
|
|
|
markPoint: {
|
|
|
|
|
data: [{
|
|
|
|
|
coord: [x, y]
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
2025-01-15 16:57:18 +01:00
|
|
|
|
|
|
|
|
|
document.querySelector('header').addEventListener('click', () => {
|
|
|
|
|
console.log('test');
|
|
|
|
|
cCapacityMonthly.dispatchAction({
|
|
|
|
|
type: 'timelineChange',
|
|
|
|
|
currentIndex: 10
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
2025-01-13 22:50:03 +01:00
|
|
|
|
cCapacity.on('click', 'series', (e) => {
|
|
|
|
|
|
|
|
|
|
// Switch to correct calendar in the timeline
|
|
|
|
|
cTimeline.dispatchAction({
|
|
|
|
|
type: 'timelineChange',
|
|
|
|
|
currentIndex: e.dataIndex
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
2025-01-14 22:11:31 +01:00
|
|
|
|
|
|
|
|
|
cHeatmap.on('click', 'series', (e) => {
|
|
|
|
|
window.open(`/property/${e.value[1]}?date=${e.value[0]}`, '_self');
|
|
|
|
|
})
|
|
|
|
|
|
2025-01-12 20:55:46 +01:00
|
|
|
|
</script>
|
|
|
|
|
@endsection
|