From 96ed5bc843239a965a51e8fcd6b52ae70f12b08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Benko?= Date: Tue, 30 Sep 2025 23:47:45 +0200 Subject: [PATCH] feat(frontend/activity_timeline): add legend Adds legend with possibility to toggle individual axes/datasets (bytes, packets and flows). --- frontend/src/components/ActivityTimeline.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/ActivityTimeline.vue b/frontend/src/components/ActivityTimeline.vue index 64be34f..a83201c 100644 --- a/frontend/src/components/ActivityTimeline.vue +++ b/frontend/src/components/ActivityTimeline.vue @@ -63,6 +63,7 @@ const chartOptions = computed(() => { scales: { x: scaleXOptions, packets: { + display: 'auto', ticks: { callback: (v) => `${v} ${CHART_UNITS[0]}`, color: CHART_COLORS[0], @@ -72,6 +73,7 @@ const chartOptions = computed(() => { min: 0, }, flows: { + display: 'auto', ticks: { callback: (v) => `${v} ${CHART_UNITS[1]}`, color: CHART_COLORS[1], @@ -81,6 +83,7 @@ const chartOptions = computed(() => { min: 0, }, bytes: { + display: 'auto', ticks: { callback: (v) => `${v} ${CHART_UNITS[2]}`, color: CHART_COLORS[2], @@ -91,7 +94,10 @@ const chartOptions = computed(() => { }, }, plugins: { - legend: false, + legend: { + display: true, + position: 'top', + }, tooltip: { callbacks: { label: (item) => {