From a34fe3deb2bb2b08a78cfb0f519d646481ebbe2d Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Thu, 2 May 2024 11:11:20 +0200
Subject: [PATCH] use margin to calculate plot width

---
 components/content/ArticleSystemDistributionPlot.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/content/ArticleSystemDistributionPlot.vue b/components/content/ArticleSystemDistributionPlot.vue
index 6b401539..f84f3a12 100644
--- a/components/content/ArticleSystemDistributionPlot.vue
+++ b/components/content/ArticleSystemDistributionPlot.vue
@@ -60,7 +60,7 @@ onMounted(() => {
 
 
 const plotContainer = ref(null)
-const maxBarWidth = ref<number>(100)
+const maxBarWidth = ref<number>(80)
 const computedWidth = computed(() => {
     const { marginLeft, marginRight } = toValue(margin)
     const filteredDistributionVal = toValue(filteredDistribution)
@@ -138,7 +138,7 @@ const distributionOptions = computed(() => {
             marginLeft: 10,
             label: toValue(plotFill) === 'percent' ? toValue(plotLabelPercent) : toValue(plotLabelCount),
         },
-        width: computedWidth.value,
+        width: computedWidth.value - marginLeft - marginRight,
         marks: [
             Plot.barY(
                 toValue(filteredDistribution),
-- 
GitLab