From 50c3587617890e06a78e96171185ae2b164f0d94 Mon Sep 17 00:00:00 2001 From: Filip Gutica Date: Thu, 14 Sep 2023 13:18:09 -0700 Subject: [PATCH 1/4] fix(analytics-chart): better legend label truncation [MA-2048] https://konghq.atlassian.net/browse/MA-2048 --- .../analytics/analytics-chart/sandbox/App.vue | 2 +- .../components/chart-plugins/ChartLegend.vue | 28 +++++++++++++++---- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/packages/analytics/analytics-chart/sandbox/App.vue b/packages/analytics/analytics-chart/sandbox/App.vue index 75d3f7bb31..2e33edc20f 100644 --- a/packages/analytics/analytics-chart/sandbox/App.vue +++ b/packages/analytics/analytics-chart/sandbox/App.vue @@ -353,7 +353,7 @@ const metricItems = [{ }] const statusCodeLabels = [ - '200', '300', '400', '500', 'This is a really long chart label to test long labels', + '200', '300', '400', '500', '501', '502', '503', '404', '401', '202', '201', '203', '204', 'This is a really long chart label to test long labels', ] const statusCodeDimensionValues = ref(new Set(statusCodeLabels)) diff --git a/packages/analytics/analytics-chart/src/components/chart-plugins/ChartLegend.vue b/packages/analytics/analytics-chart/src/components/chart-plugins/ChartLegend.vue index 0449319e47..f0410a960b 100644 --- a/packages/analytics/analytics-chart/src/components/chart-plugins/ChartLegend.vue +++ b/packages/analytics/analytics-chart/src/components/chart-plugins/ChartLegend.vue @@ -1,12 +1,13 @@