2024-12-18 15:14:13 +01:00
|
|
|
@extends('base')
|
2025-01-05 13:26:51 +01:00
|
|
|
@section('body-class', 'property')
|
|
|
|
|
|
|
|
@section('header')
|
|
|
|
<span>Property {{ $base['property_platform_id'] }}</span><button popovertarget="prop-details"></button>
|
|
|
|
<div popover id="prop-details">
|
|
|
|
<dl>
|
|
|
|
<dt>Region</dt>
|
|
|
|
<dd>{{ $base['region_name'] }}</dd>
|
|
|
|
<dt>Zum ersten mal gefunden</dt>
|
|
|
|
<dd>{{ $base['first_found'] }}</dd>
|
|
|
|
<dt>Zum letzten mal gefunden</dt>
|
|
|
|
<dd>{{ $base['last_found'] }}</dd>
|
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
2024-12-18 15:14:13 +01:00
|
|
|
@section('main')
|
2025-01-04 18:16:12 +01:00
|
|
|
<article style="grid-area: timeline;">
|
|
|
|
<div id="timeline"></div>
|
2024-12-18 15:14:13 +01:00
|
|
|
</article>
|
2025-01-04 18:16:12 +01:00
|
|
|
<article class="header" style="grid-area: chart1;">
|
2024-12-18 15:14:13 +01:00
|
|
|
<header>
|
|
|
|
<h2 id="belegung-title">
|
|
|
|
Belegung am {{ json_decode($extractiondates)[0] }}
|
|
|
|
</h2>
|
|
|
|
</header>
|
|
|
|
<div id="chart-calendar"></div>
|
|
|
|
</article>
|
2025-01-04 18:16:12 +01:00
|
|
|
<article class="header" style="grid-area: chart3;">
|
|
|
|
<header>
|
|
|
|
<h2>
|
|
|
|
Auslastung nach Monat am 2024-04-15T07:06:22
|
|
|
|
</h2>
|
|
|
|
</header>
|
|
|
|
<div id="chart-capacity-monthly">
|
|
|
|
</div>
|
|
|
|
</article>
|
|
|
|
<article class="header" style="grid-area: chart2;">
|
2024-12-19 19:22:09 +01:00
|
|
|
<header>
|
|
|
|
<h2>
|
|
|
|
Entwicklung der Verfügbarkeit
|
|
|
|
</h2>
|
2025-01-05 13:26:51 +01:00
|
|
|
<button popovertarget="chart-capacity-popover"></button>
|
|
|
|
<div id="chart-capacity-popover" popover>
|
|
|
|
<h2>Erkläung zum Diagramm</h2>
|
|
|
|
<p>Das Liniendiagramm zeigt, wie sich die insgesamte Verfügbarkeit des Kurzzeitmietobjekts entwickelt hat.</p>
|
|
|
|
</div>
|
2024-12-19 19:22:09 +01:00
|
|
|
</header>
|
|
|
|
<div id="chart-capacity"></div>
|
|
|
|
</article>
|
2025-01-04 18:16:12 +01:00
|
|
|
<article class="header" style="grid-area: chart4;">
|
|
|
|
<header>
|
|
|
|
<h2>
|
|
|
|
Auslastung Tage für Monat
|
|
|
|
</h2>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
</article>
|
2024-12-18 15:14:13 +01:00
|
|
|
<script type="module">
|
2025-01-04 18:16:12 +01:00
|
|
|
const chartTimeline = document.getElementById('timeline');
|
|
|
|
const cTimeline = echarts.init(chartTimeline);
|
|
|
|
|
|
|
|
const cTimelineOptions = {
|
|
|
|
grid: {
|
|
|
|
show: false,
|
|
|
|
},
|
|
|
|
timeline: {
|
|
|
|
data: {!! $extractiondates !!},
|
|
|
|
playInterval: 2000,
|
|
|
|
axisType: 'time',
|
|
|
|
left: 8,
|
|
|
|
right: 8,
|
|
|
|
bottom: 0,
|
|
|
|
label: {
|
|
|
|
show: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
cTimeline.setOption(cTimelineOptions);
|
|
|
|
|
|
|
|
const chartCapacityMonthly = document.getElementById('chart-capacity-monthly');
|
|
|
|
const cCapacityMonthly = echarts.init(chartCapacityMonthly);
|
|
|
|
|
|
|
|
const cCapacityMonthlyOptions = {
|
|
|
|
timeline: {
|
|
|
|
show: false,
|
|
|
|
data: {!! $extractiondates !!},
|
|
|
|
axisType: 'time',
|
|
|
|
},
|
|
|
|
grid: {
|
|
|
|
top: 0,
|
|
|
|
bottom: 25,
|
|
|
|
left: 50,
|
|
|
|
right: 10
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
type: 'value',
|
|
|
|
max: 100
|
|
|
|
},
|
|
|
|
yAxis: {
|
|
|
|
type: 'category',
|
|
|
|
},
|
|
|
|
options: [{
|
|
|
|
yAxis: {
|
|
|
|
data: ['Apr 24', 'May 24', 'Jun 24', 'Aug 24', 'Sep 24', 'Oct 24', 'Nov 24', 'Dec 24', 'Jan 25', 'Feb 25', 'Mar 25', 'Apr 25', 'May 25', 'Jun 25', 'Jul 25', 'Aug 25', 'Sep 25', 'Oct 25']
|
|
|
|
},
|
|
|
|
series: [{
|
|
|
|
type: 'bar',
|
|
|
|
data: [100, 80, 20, 20, 3, 23, 34, 23, 45, 12, 34,23,45,12,34,45,12,34]
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
};
|
|
|
|
|
|
|
|
cCapacityMonthly.setOption(cCapacityMonthlyOptions);
|
|
|
|
|
2024-12-19 19:22:09 +01:00
|
|
|
const chartCapacity = document.getElementById('chart-capacity');
|
|
|
|
const cCapacity = echarts.init(chartCapacity);
|
|
|
|
|
|
|
|
const cCapacityOptions = {
|
|
|
|
tooltip: {
|
2025-01-05 13:26:51 +01:00
|
|
|
trigger: 'axis',
|
|
|
|
formatter: 'Datum Scraping: {b}<br />Verfügbarkeit: {c} %'
|
2024-12-19 19:22:09 +01:00
|
|
|
},
|
|
|
|
grid: {
|
2025-01-04 18:16:12 +01:00
|
|
|
top: 20,
|
2025-01-05 13:26:51 +01:00
|
|
|
left: 25,
|
2024-12-19 19:22:09 +01:00
|
|
|
right: 10,
|
2025-01-05 13:26:51 +01:00
|
|
|
bottom: 20,
|
2024-12-19 19:22:09 +01:00
|
|
|
containLabel: true
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
type: 'category',
|
|
|
|
boundaryGap: false,
|
2025-01-05 13:26:51 +01:00
|
|
|
data: {!! json_encode($capacities['dates']) !!},
|
|
|
|
name: 'Zeitpunkt Scraping',
|
|
|
|
nameLocation: 'center',
|
|
|
|
nameGap: 24,
|
|
|
|
nameTextStyle: {
|
|
|
|
fontWeight: 'bold',
|
|
|
|
}
|
2024-12-19 19:22:09 +01:00
|
|
|
},
|
|
|
|
yAxis: {
|
|
|
|
type: 'value',
|
|
|
|
min: 0,
|
2025-01-05 13:26:51 +01:00
|
|
|
max: 100,
|
|
|
|
name: 'Auslastung in Prozent',
|
|
|
|
nameLocation: 'center',
|
|
|
|
nameGap: 38,
|
|
|
|
nameTextStyle: {
|
|
|
|
fontWeight: 'bold',
|
|
|
|
}
|
2024-12-19 19:22:09 +01:00
|
|
|
},
|
2024-12-20 12:20:49 +01:00
|
|
|
series: {
|
2024-12-19 19:22:09 +01:00
|
|
|
name: 'Alle',
|
|
|
|
type: 'line',
|
|
|
|
stack: 'Total',
|
|
|
|
symbolSize: 7,
|
|
|
|
data: {!! json_encode($capacities['capacities']) !!}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
cCapacity.setOption(cCapacityOptions);
|
|
|
|
|
2024-12-18 15:14:13 +01:00
|
|
|
const chartCalendar = document.getElementById('chart-calendar');
|
|
|
|
const cCalendar = echarts.init(chartCalendar);
|
|
|
|
const h2Belegung = document.getElementById('belegung-title');
|
|
|
|
|
|
|
|
const cCalendarOptions = {
|
|
|
|
timeline: {
|
2025-01-04 18:16:12 +01:00
|
|
|
show: false,
|
2024-12-18 15:14:13 +01:00
|
|
|
data: {!! $extractiondates !!},
|
2024-12-18 19:52:06 +01:00
|
|
|
axisType: 'time',
|
2024-12-18 15:14:13 +01:00
|
|
|
},
|
|
|
|
visualMap: {
|
|
|
|
categories: [0,1,2],
|
|
|
|
inRange: {
|
2025-01-04 18:16:12 +01:00
|
|
|
color: ['#d95f02', '#7570b3', '#1b9e77']
|
2024-12-18 15:14:13 +01:00
|
|
|
},
|
|
|
|
formatter: (cat) => {
|
|
|
|
switch (cat) {
|
|
|
|
case 0:
|
|
|
|
return 'Ausgebucht';
|
|
|
|
case 1:
|
|
|
|
return 'Verfügbar (kein Anreisetag)';
|
|
|
|
case 2:
|
|
|
|
return 'Verfügbar';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
type: 'piecewise',
|
|
|
|
orient: 'horizontal',
|
|
|
|
left: 'center',
|
|
|
|
top: 0
|
|
|
|
},
|
|
|
|
calendar:[
|
|
|
|
{
|
|
|
|
orient: 'horizontal',
|
|
|
|
range: '2024',
|
2025-01-04 18:16:12 +01:00
|
|
|
top: '15%',
|
2024-12-19 19:22:09 +01:00
|
|
|
right: 10,
|
2025-01-04 18:16:12 +01:00
|
|
|
bottom: '65%',
|
2024-12-18 15:14:13 +01:00
|
|
|
left: 50,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
orient: 'horizontal',
|
|
|
|
range: '2025',
|
2025-01-04 18:16:12 +01:00
|
|
|
top: '47%',
|
2024-12-19 19:22:09 +01:00
|
|
|
right: 10,
|
2025-01-04 18:16:12 +01:00
|
|
|
bottom: '33%',
|
2024-12-18 15:14:13 +01:00
|
|
|
left: 50,
|
|
|
|
},
|
2024-12-19 19:22:09 +01:00
|
|
|
{
|
|
|
|
orient: 'horizontal',
|
|
|
|
range: '2026',
|
2025-01-04 18:16:12 +01:00
|
|
|
top: '79%',
|
2024-12-19 19:22:09 +01:00
|
|
|
right: 10,
|
2025-01-04 18:16:12 +01:00
|
|
|
bottom: '1%',
|
2024-12-19 19:22:09 +01:00
|
|
|
left: 50,
|
|
|
|
}
|
2024-12-18 15:14:13 +01:00
|
|
|
],
|
|
|
|
options: [
|
|
|
|
@foreach ($calendar as $c)
|
|
|
|
{
|
|
|
|
series: [{
|
|
|
|
type: 'heatmap',
|
|
|
|
coordinateSystem: 'calendar',
|
|
|
|
calendarIndex: 0,
|
|
|
|
data: {!! json_encode($c) !!}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'heatmap',
|
|
|
|
coordinateSystem: 'calendar',
|
|
|
|
calendarIndex: 1,
|
|
|
|
data: {!! json_encode($c) !!}
|
2024-12-19 19:22:09 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'heatmap',
|
|
|
|
coordinateSystem: 'calendar',
|
|
|
|
calendarIndex: 2,
|
|
|
|
data: {!! json_encode($c) !!}
|
2024-12-18 15:14:13 +01:00
|
|
|
}]
|
|
|
|
},
|
|
|
|
@endforeach
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
cCalendar.setOption(cCalendarOptions);
|
2025-01-04 18:16:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
cTimeline.on('timelinechanged', (e) => {
|
|
|
|
|
2024-12-18 15:14:13 +01:00
|
|
|
h2Belegung.innerText = "Belegung am "+cCalendarOptions.timeline.data[e.currentIndex];
|
2024-12-19 19:22:09 +01:00
|
|
|
|
2024-12-20 12:20:49 +01:00
|
|
|
// Set markpoint on linechart
|
|
|
|
let x = cCapacityOptions.xAxis.data[e.currentIndex];
|
|
|
|
let y = cCapacityOptions.series.data[e.currentIndex];
|
2025-01-04 18:16:12 +01:00
|
|
|
|
|
|
|
cCapacityMonthly.dispatchAction({
|
|
|
|
type: 'timelineChange',
|
|
|
|
currentIndex: e.currentIndex
|
|
|
|
});
|
|
|
|
|
|
|
|
cCalendar.dispatchAction({
|
|
|
|
type: 'timelineChange',
|
|
|
|
currentIndex: e.currentIndex
|
|
|
|
});
|
|
|
|
|
2024-12-20 12:20:49 +01:00
|
|
|
cCapacity.setOption({
|
|
|
|
series: {
|
|
|
|
markPoint: {
|
|
|
|
data: [{
|
|
|
|
coord: [x, y]
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2025-01-04 18:16:12 +01:00
|
|
|
|
2024-12-18 15:14:13 +01:00
|
|
|
})
|
|
|
|
|
2024-12-19 19:22:09 +01:00
|
|
|
cCapacity.on('click', 'series', (e) => {
|
|
|
|
|
2024-12-20 12:20:49 +01:00
|
|
|
// Switch to correct calendar in the timeline
|
2025-01-04 18:16:12 +01:00
|
|
|
cTimeline.dispatchAction({
|
2024-12-19 19:22:09 +01:00
|
|
|
type: 'timelineChange',
|
|
|
|
currentIndex: e.dataIndex
|
|
|
|
});
|
|
|
|
|
2025-01-04 18:16:12 +01:00
|
|
|
|
2024-12-19 19:22:09 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
|
2024-12-18 15:14:13 +01:00
|
|
|
</script>
|
|
|
|
@endsection
|