adds charts panel

This commit is contained in:
2025-02-15 15:42:33 -08:00
parent 69c0b0965d
commit e9751c2489
16 changed files with 600 additions and 42 deletions

View File

@@ -0,0 +1,51 @@
<script setup lang="ts">
import type { TelemetryDefinition } from '@/composables/telemetry.ts';
import SvgGraph from '@/components/SvgGraph.vue';
import { GraphSide } from '@/graph/graph.ts';
import GraphAxis from '@/components/GraphAxis.vue';
import TelemetryLine from '@/components/TelemetryLine.vue';
defineProps<{
charts: TelemetryDefinition[][][];
}>();
</script>
<template>
<div
class="chart grid grow"
:style="`grid-template: repeat(${charts[0].length} , 1fr) / repeat(${charts.length}, 1fr);`"
v-if="charts.length > 0"
>
<template v-for="y in charts[0].length" :key="y">
<template v-for="x in charts.length" :key="x">
<div class="no-min-height">
<SvgGraph
right_axis
cursor
:legend="GraphSide.Left"
include_controls
>
<GraphAxis>
<TelemetryLine
v-for="tlm in charts[x - 1][y - 1]"
:key="tlm.uuid"
:data="tlm.name"
></TelemetryLine>
</GraphAxis>
</SvgGraph>
</div>
</template>
</template>
</div>
</template>
<style scoped lang="scss">
@use '@/assets/variables';
.chart.grid {
display: grid;
grid-auto-flow: row;
place-content: stretch;
height: 100%;
}
</style>