diff --git a/components/content/RefseqDb.vue b/components/content/RefseqDb.vue index 9f4a2cdd1f1cd2a153a57aca9f7618334187afbd..17f5ced32b645cb84af481764a1ec6a3102613be 100644 --- a/components/content/RefseqDb.vue +++ b/components/content/RefseqDb.vue @@ -247,19 +247,18 @@ const computedDistriSystemOptions = computed(() => { return { ...defaultBarPlotOptions.value, + title: "System distribution", marginBottom: 100, y: { ...defaultBarPlotOptions.value.y, type: toValue(scaleType), label: "Count" }, x: { ...defaultBarPlotOptions.value.x, label: "Systems" }, width: computedWidth.value, marks: [ - // Plot.frame(), Plot.barY( toValue(computedSystemDistribution), { y: "count", x: 'type', tip: true, sort: { x: "-y" }, }, - ), ], }; @@ -284,13 +283,13 @@ const computedTaxonomyDistribution = computed(() => { const computedDistriTaxoOptions = computed(() => { return { ...defaultBarPlotOptions.value, + title: "Taxonomic distribution", marginBottom: 100, x: { ...defaultBarPlotOptions.value.x, label: selectedTaxoRank.value }, y: { ...defaultBarPlotOptions.value.y, type: toValue(scaleType), label: "Count" }, width: computedWidth.value, marks: [ Plot.barY( - toValue(computedTaxonomyDistribution), { y: "count", @@ -303,6 +302,8 @@ const computedDistriTaxoOptions = computed(() => { ], }; }); + + function capitalize(name: string) { const [first, ...rest] = name return first.toUpperCase() + rest.join('').toLowerCase(); @@ -330,7 +331,7 @@ const binPlotOptions = computed(() => { grid: true, x: { tickRotate: 90, label: "Systems" }, // y: { tickFormat: 's' }, - color: { scheme: "plasma", legend: true, label: `Proportion of genomes with defense system X for a given ${selectedTaxoRank.value} clade`, domain: [0, 100] }, + color: { scheme: "plasma", legend: true, label: `Proportion per ${selectedTaxoRank.value}`, domain: [0, 100] }, } }) @@ -373,7 +374,7 @@ const binPlotDataOptions = computed(() => { return toValueAllHits?.hits?.length > 0 ? { ...binPlotOptions.value, width: width.value, - + title: "Proportion of genomes with defense system X for a given clade", color: { ...binPlotOptions.value.color, type: scaleType.value,