From a1957ca31408b33fd133eff6d70b3c360b5f7b87 Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Thu, 28 Mar 2024 21:21:46 +0100 Subject: [PATCH] add color on count --- components/content/ArticleSystemDistributionPlot.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/content/ArticleSystemDistributionPlot.vue b/components/content/ArticleSystemDistributionPlot.vue index 9b871639..326e0d97 100644 --- a/components/content/ArticleSystemDistributionPlot.vue +++ b/components/content/ArticleSystemDistributionPlot.vue @@ -49,7 +49,7 @@ const computedDistribution = computed(() => { // group per selected taxo rank and accession const itemsPerGroup = d3.rollup(toValSystemHits.hits, D => D.length, d => d[toValSelectedTaxoRank], d => d.Assembly) console.log(itemsPerGroup) - if (toValSelectedTaxoRank === "order"){ + if (toValSelectedTaxoRank === "order") { console.log(itemsPerGroup.get("Oscillatoriales")) } const distribution = [] @@ -96,6 +96,7 @@ const distributionOptions = computed(() => { marginRight: marginRight.value, y: { label: `% of genomes encoding ${toValue(page)?.title ?? 'the system'}` }, x: { label: selectedTaxoRank.value, tickRotate: 45 }, + color: { scheme: "plasma", legend: true, domain: [0, 100] }, width: computedWidth.value - marginRight.value, marks: [ Plot.barY( @@ -103,6 +104,7 @@ const distributionOptions = computed(() => { { y: "size", x: "taxo", + fill: "size", tip: true, sort: { x: "-y" }, }, -- GitLab