some polishing
This commit is contained in:
1 parent
959b84d1e1
commit
3290c1cce3
6 files changed
+185
-83
No files matched your search
@@ -19,20 +19,20 @@
|
||||
</article>
|
||||
<article class="header" style="grid-area: chart6;">
|
||||
<header>
|
||||
<h2 id="prediction-title">Gleitender Mittelwert für die Auslastung von {{ $region[0]['region_name'] }}</h2>
|
||||
<h2 id="prediction-title">Gleitender Mittelwert für die Auslastung der Region</h2>
|
||||
</header>
|
||||
<div id="chart-prediction"></div>
|
||||
</article>
|
||||
<article class="header" style="grid-area: chart1;">
|
||||
<header>
|
||||
<h2 id="belegung-title">Gesamtauslastung</h2>
|
||||
<h2 id="belegung-title">Auslastung aller Mietobjekte über Gesamte Zeit der Region</h2>
|
||||
</header>
|
||||
<div id="chart-heatmap"></div>
|
||||
</article>
|
||||
<article class="header" style="grid-area: chart3;">
|
||||
<header>
|
||||
<h2>
|
||||
Auslastung der Region nach Monat am <span class="date">{{ $startDate }}</span>
|
||||
Auslastung 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 der Region nach Wochentage am <span class="date">{{ $startDate }}</span>
|
||||
Auslastung Wochentage am <span class="date">{{ $startDate }}</span>
|
||||
</h2>
|
||||
</header>
|
||||
<div id="chart-capacity-daily">
|
||||
@@ -71,6 +71,11 @@ const sharedOptions = {
|
||||
right: 0,
|
||||
bottom: 50
|
||||
},
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: 'axis',
|
||||
valueFormatter: (value) => value.toFixed(2)+' %'
|
||||
},
|
||||
name: (opt) => {
|
||||
return {
|
||||
name: opt.name,
|
||||
@@ -89,12 +94,9 @@ const cCapacity = echarts.init(chartCapacity);
|
||||
|
||||
const cCapacityOptions = {
|
||||
legend: {
|
||||
data: ['Auslastung Region', 'Auslastung alle Regionen']
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
valueFormatter: (value) => value.toFixed(2)+' %'
|
||||
show: true
|
||||
},
|
||||
tooltip: sharedOptions.basic.tooltip,
|
||||
color: sharedOptions.basic.color,
|
||||
grid: {
|
||||
top: 20,
|
||||
@@ -151,18 +153,25 @@ const cCapacityMonthlyOptions = {
|
||||
axisType: 'time',
|
||||
},
|
||||
grid: {
|
||||
top: 0,
|
||||
bottom: 25,
|
||||
top: 5,
|
||||
bottom: 40,
|
||||
left: 70,
|
||||
right: 10
|
||||
},
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
max: 100
|
||||
max: 100,
|
||||
name: 'Auslastung in %',
|
||||
nameLocation: 'center',
|
||||
nameGap: 25,
|
||||
nameTextStyle: {
|
||||
fontWeight: 'bold',
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'category',
|
||||
},
|
||||
tooltip: sharedOptions.basic.tooltip,
|
||||
options: [
|
||||
@foreach ($regionCapacities['region_monthly'] as $m)
|
||||
{
|
||||
@@ -192,15 +201,22 @@ const cCapacityDailyOptions = {
|
||||
data: {!! json_encode($regionCapacities['region']['dates']) !!},
|
||||
axisType: 'time',
|
||||
},
|
||||
tooltip: sharedOptions.basic.tooltip,
|
||||
grid: {
|
||||
top: 0,
|
||||
bottom: 25,
|
||||
top: 5,
|
||||
bottom: 40,
|
||||
left: 70,
|
||||
right: 10
|
||||
},
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
max: 100
|
||||
max: 100,
|
||||
name: 'Auslastung in %',
|
||||
nameLocation: 'center',
|
||||
nameGap: 25,
|
||||
nameTextStyle: {
|
||||
fontWeight: 'bold',
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'category',
|
||||
@@ -229,6 +245,7 @@ const chartPrediction = document.getElementById('chart-prediction');
|
||||
const cPrediction = echarts.init(chartPrediction);
|
||||
|
||||
const cPredictionOptions = {
|
||||
color: sharedOptions.basic.color,
|
||||
timeline: {
|
||||
show: false,
|
||||
data: {!! json_encode($regionCapacities['region']['dates']) !!},
|
||||
@@ -238,10 +255,7 @@ const cPredictionOptions = {
|
||||
legend: {
|
||||
show: true
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
valueFormatter: (value) => value.toFixed(2)+' %'
|
||||
},
|
||||
tooltip: sharedOptions.basic.tooltip,
|
||||
grid: {
|
||||
top: 20,
|
||||
left: 25,
|
||||
@@ -468,6 +482,16 @@ cTimeline.on('timelinechanged', (e) => {
|
||||
|
||||
})
|
||||
|
||||
|
||||
document.querySelector('header').addEventListener('click', () => {
|
||||
console.log('test');
|
||||
cCapacityMonthly.dispatchAction({
|
||||
type: 'timelineChange',
|
||||
currentIndex: 10
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
cCapacity.on('click', 'series', (e) => {
|
||||
|
||||
// Switch to correct calendar in the timeline
|
||||
|
||||
Reference in new issue
Block a user