Added Crew and General Aviation Filters
This commit is contained in:
@@ -4,6 +4,7 @@ import { FlightStats } from "@/Composables/useFlightStats"
|
||||
import { useChartTooltip } from '@/Composables/useChartTooltip'
|
||||
import ScrollingHorizontalBarChart from "@/Components/FlightsGoneBy/Charts/ChartTypes/ScrollingHorizontalBarChart.vue"
|
||||
import ChartTooltip from "@/Components/FlightsGoneBy/Charts/ChartTooltip.vue"
|
||||
import InlineBadge from "@/Components/FlightsGoneBy/InlineBadge.vue";
|
||||
|
||||
interface AirportItem {
|
||||
label: string
|
||||
@@ -42,21 +43,21 @@ const chartEvents = computed(() => ({
|
||||
@mousemove="onMouseMove"
|
||||
@mouseleave="onMouseLeave"
|
||||
>
|
||||
<template #tooltip>
|
||||
<ChartTooltip :visible="!!tooltipItem" :x="tooltipX" :y="tooltipY">
|
||||
<div class="ct-name">{{ tooltipItem?.fullName }}</div>
|
||||
<div class="ct-sub">{{ tooltipItem?.label }}</div>
|
||||
<template #tooltip="{ visible, x, y, index }">
|
||||
<ChartTooltip :visible="visible" :x="x" :y="y">
|
||||
<div class="ct-name">{{ index !== null ? airports[index].fullName : '' }}</div>
|
||||
<div class="ct-sub"><InlineBadge variant="generic">{{ index !== null ? airports[index].label : '' }}</InlineBadge></div>
|
||||
<div class="ct-row">
|
||||
<span class="ct-label">Departures</span>
|
||||
<span class="ct-val">{{ tooltipItem?.departures }}</span>
|
||||
<span class="ct-val">{{ index !== null ? airports[index].departures : '' }}</span>
|
||||
</div>
|
||||
<div class="ct-row">
|
||||
<span class="ct-label">Arrivals</span>
|
||||
<span class="ct-val">{{ tooltipItem?.arrivals }}</span>
|
||||
<span class="ct-val">{{ index !== null ? airports[index].arrivals : '' }}</span>
|
||||
</div>
|
||||
<div v-if="tooltipItem?.upcoming" class="ct-row">
|
||||
<div v-if="index !== null && airports[index].upcoming" class="ct-row">
|
||||
<span class="ct-label">Upcoming</span>
|
||||
<span class="ct-val">{{ tooltipItem?.upcoming }}</span>
|
||||
<span class="ct-val">{{ airports[index].upcoming }}</span>
|
||||
</div>
|
||||
</ChartTooltip>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user