Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions resources/lang/en/disposable.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,5 @@
'menu_pireps' => 'Reports',
'menu_market' => 'Pilot Shop',
'menu_mymarket' => 'Bought Items',
'menu_missions' => 'Missions',
];
1 change: 1 addition & 0 deletions resources/lang/es-es/disposable.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,5 @@
'menu_pireps' => 'Informes',
'menu_market' => 'Tienda Piloto',
'menu_mymarket' => 'Adquisiciones',
'menu_missions' => 'Misiones',
];
219 changes: 121 additions & 98 deletions resources/views/layouts/Disposable_v3/pireps/chart.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,116 +9,139 @@
$terr[] = ($a->altitude_msl - $a->altitude_agl) > 0 ? $a->altitude_msl - $a->altitude_agl : 0;
}
@endphp
<div name="chart" class="p-1"></div>
<div id="chart" class="p-1"></div>
<script src="https://cdn.jsdelivr.net/npm/apexcharts"></script>
<script>
var options = {
chart: {
fontFamily: 'Helvetica, Arial, sans-serif',
height: 'auto',
width: '100%',
redrawOnParentResize: true,
zoom: {
enabled: true
},
toolbar: {
show: true,
offsetX: -10,
offsetY: 0,
tools: {
download: true,
selection: false,
zoom: true,
zoomin: true,
zoomout: true,
pan: false,
reset: true | '<img src="/static/icons/reset.png" width="20">',
customIcons: []
}
},
<script>
var options = {
chart: {
fontFamily: 'Helvetica, Arial, sans-serif',
height: 'auto',
width: '100%',
redrawOnParentResize: true,
zoom: {
enabled: true
},
title: {
text: '{!! $pirep->ident !!} Altitude and Speed Records',
align: 'left',
style: {
fontWeight: 'bold'
},
},
legend: {
toolbar: {
show: true,
horizontalAlign: 'center',
position: 'top',
offsetX: -10,
offsetY: 0,
tools: {
download: true,
selection: false,
zoom: true,
zoomin: true,
zoomout: true,
pan: false,
reset: true | '<img src="/static/icons/reset.png" width="20">',
customIcons: []
}
},
tooltip: {
x: {
show: false,
},
title: {
text: '{!! $pirep->ident !!} Altitude and Speed Records',
align: 'left',
style: {
fontWeight: 'bold'
},
},
legend: {
show: true,
horizontalAlign: 'center',
position: 'top',
},
tooltip: {
x: {
show: false,
},
fixed: {
enabled: false,
position: 'topLeft',
offsetX: 60,
offsetY: 80,
}
},
series: [
{
name: 'Altitude (MSL)',
type: 'line',
color: '#191970',
zIndex: 5,
data: {!! json_encode($msl) !!},
}, {
name: 'Altitude (AGL)',
type: 'line',
color: '#66CDAA',
hidden: true,
zIndex: 4,
data: {!! json_encode($agl) !!},
}, {
name: 'Speed (GS)',
type: 'line',
color: '#F70D1A',
hidden: false,
zIndex: 3,
data: {!! json_encode($spd) !!},
}, {
name: 'Speed (IAS)',
type: 'line',
color: '#800080',
hidden: false,
zIndex: 2,
data: {!! json_encode($ias) !!},
}, {
name: 'Terrain Elevation',
type: 'area',
color: '#8B4513',
zIndex: 1,
fill: {
colors: ['#A0522D'],
opacity: 0.6
},
fixed: {
enabled: false,
position: 'topLeft',
offsetX: 60,
offsetY: 80,
}
data: {!! json_encode($terr) !!},
}
],
stroke: {
width: 3,
curve: 'monotoneCubic'
},
xaxis: {
labels: {
show: false,
},
series: [
{
name: 'Altitude (MSL)',
type: 'line',
color: '#191970',
zIndex: 5,
data: {!! json_encode($msl) !!}
}, {
name: 'Altitude (AGL)',
type: 'line',
color: '#66CDAA',
hidden: true,
zIndex: 4,
data: {!! json_encode($agl) !!}
}, {
name: 'Speed (GS)',
type: 'line',
color: '#F70D1A',
hidden: false,
zIndex: 3,
data: {!! json_encode($spd) !!}
}, {
name: 'Speed (IAS)',
type: 'line',
color: '#800080',
hidden: false,
zIndex: 2,
data: {!! json_encode($ias) !!}
}, {
name: 'Terrain Elevation',
type: 'area',
color: '#8B4513',
zIndex: 1,
fill: {
colors: ['#A0522D'],
opacity: 0.6
},
data: {!! json_encode($terr) !!}
}
],
stroke: {
width: 3,
curve: 'monotoneCubic'
tooltip: {
enabled: false,
},
xaxis: {
labels: {
show: false,
decimalsInFloat: 0
},
yaxis: [
{
title: {
text: 'Altitude (MSL and AGL)',
},
tooltip: {
enabled: false,
forceNiceScale: true,
decimalsInFloat: 0,
seriesName: ['Altitude (MSL)', 'Altitude (AGL)']
},
{
title: {
text: 'Speed (IAS and GS)',
},
decimalsInFloat: 0
forceNiceScale: true,
decimalsInFloat: 0,
opposite: true,
seriesName: ['Speed (GS)', 'Speed (IAS)']
},
yaxis: {
{
title: {
text: 'Terrain Elevation',
},
forceNiceScale: true,
decimalsInFloat: 0,
seriesName: 'Terrain Elevation'
}
}
]
}

var chart = new ApexCharts(document.querySelector("#chart"), options);
chart.render();
var chart = new ApexCharts(document.querySelector("#chart"), options);
chart.render();
</script>