diff --git a/frontend/src/components/GraphAxis.vue b/frontend/src/components/GraphAxis.vue
index e9e9472..b2f6739 100644
--- a/frontend/src/components/GraphAxis.vue
+++ b/frontend/src/components/GraphAxis.vue
@@ -1,18 +1,19 @@
-
+
{
text_offset
"
:y="y_map(tick)"
- >{{ tick.toFixed(2) }}
+ >
@@ -196,7 +196,7 @@ const lines = computed(() => {
text_offset
"
:y="y_map(tick)"
- >{{ tick.toFixed(1) }}
@@ -212,12 +212,14 @@ const lines = computed(() => {
text_offset
"
:y="y_map(tick)"
- >{{ tick.toFixed(0) }}
+
+
-
+
{
text_offset
"
:y="y_map(tick)"
- >{{ tick.toFixed(2) }}
+ >
@@ -246,8 +247,7 @@ const lines = computed(() => {
text_offset
"
:y="y_map(tick)"
- >{{ tick.toFixed(1) }}
+ >
@@ -262,8 +262,7 @@ const lines = computed(() => {
text_offset
"
:y="y_map(tick)"
- >{{ tick.toFixed(0) }}
+ >
diff --git a/frontend/src/components/NumericText.vue b/frontend/src/components/NumericText.vue
new file mode 100644
index 0000000..69b92aa
--- /dev/null
+++ b/frontend/src/components/NumericText.vue
@@ -0,0 +1,65 @@
+
+
+
+ {{ display_value }}
+
+
+
\ No newline at end of file
diff --git a/frontend/src/components/SvgGraph.vue b/frontend/src/components/SvgGraph.vue
index ab67068..f365a6e 100644
--- a/frontend/src/components/SvgGraph.vue
+++ b/frontend/src/components/SvgGraph.vue
@@ -8,9 +8,11 @@ const props = defineProps<{
width: number;
height: number;
duration?: number;
- border_left_right?: number;
- border_top_bottom?: number;
utc?: boolean;
+ left_axis?: boolean;
+ right_axis?: boolean;
+ hide_time_labels?: boolean;
+ hide_time_ticks?: boolean;
}>();
const width = computed(() => {
@@ -60,8 +62,10 @@ const time_lines = [
time_lines.reverse();
const text_offset = computed(() => 5);
-const border_left_right = computed(() => props.border_left_right || 0);
-const border_top_bottom = computed(() => props.border_top_bottom || 0);
+const border_left = computed(() => props.left_axis ? 96 : 0);
+const border_right = computed(() => props.right_axis ? 80 : 0);
+const border_top = computed(() => 6);
+const border_bottom = computed(() => props.hide_time_labels ? 6 : 24);
const max_x = now;
const min_x = computed(() => max_x.value - window_duration.value);
@@ -69,20 +73,20 @@ const min_x = computed(() => max_x.value - window_duration.value);
const x_map = (x: number) => {
const diff_x = max_x.value - min_x.value;
return (
- ((width.value - 2 * border_left_right.value) * (x - min_x.value)) /
+ ((width.value - border_left.value - border_right.value) * (x - min_x.value)) /
diff_x +
- border_left_right.value
+ border_left.value
);
};
const telemetry_lines = ref([]);
provide(GRAPH_DATA, {
- border_top_bottom: border_top_bottom,
+ border_top: border_top,
min_x: min_x,
max_x: now,
- width: () => width.value - 2 * border_left_right.value,
- height: () => height.value - 2 * border_top_bottom.value,
+ width: () => width.value - border_left.value - border_right.value,
+ height: () => height.value - border_top.value - border_bottom.value,
x_map: x_map,
lines: telemetry_lines,
max_update_rate: 1000 / 10,
@@ -112,25 +116,25 @@ const lines = computed(() => {
@@ -138,12 +142,14 @@ const lines = computed(() => {
{
stroke: variables.$time-tick;
fill: variables.$time-tick;
}
+
diff --git a/frontend/src/components/ValueLabel.vue b/frontend/src/components/ValueLabel.vue
index 61f4743..7c588de 100644
--- a/frontend/src/components/ValueLabel.vue
+++ b/frontend/src/components/ValueLabel.vue
@@ -1,5 +1,6 @@
@@ -37,7 +39,7 @@ watch(
:height="16 + background_offset * 2"
>
- {{ value_text }}
+
diff --git a/frontend/src/graph/axis.ts b/frontend/src/graph/axis.ts
index 3a53162..0eea934 100644
--- a/frontend/src/graph/axis.ts
+++ b/frontend/src/graph/axis.ts
@@ -1,11 +1,5 @@
import type { Ref } from 'vue';
-export enum AxisSide {
- Right,
- Left,
- Hidden,
-}
-
export enum AxisType {
Linear,
Logarithmic,
diff --git a/frontend/src/graph/graph.ts b/frontend/src/graph/graph.ts
index d061980..bfb3ae0 100644
--- a/frontend/src/graph/graph.ts
+++ b/frontend/src/graph/graph.ts
@@ -1,9 +1,15 @@
import type { MaybeRefOrGetter, Ref } from 'vue';
+export enum GraphSide {
+ Right,
+ Left,
+ Hidden,
+}
+
export const GRAPH_DATA = Symbol();
export interface GraphData {
- border_top_bottom: MaybeRefOrGetter;
+ border_top: MaybeRefOrGetter;
min_x: MaybeRefOrGetter;
max_x: MaybeRefOrGetter;
width: MaybeRefOrGetter;
diff --git a/frontend/src/views/HomeView.vue b/frontend/src/views/HomeView.vue
index 3b3ea57..e145f69 100644
--- a/frontend/src/views/HomeView.vue
+++ b/frontend/src/views/HomeView.vue
@@ -14,8 +14,7 @@ provide(WEBSOCKET_SYMBOL, websocket);
@@ -26,9 +25,8 @@ provide(WEBSOCKET_SYMBOL, websocket);