From bed8759987bdf1faa19b6963efb356e5f19e492b Mon Sep 17 00:00:00 2001 From: Raghad Jamal Aldeen <143136267+dv-raghad-jamalaldeen@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:21:02 +0100 Subject: [PATCH] fix(vis): transparent scatterplot labels (#192) fix labels transparency --- src/vis/scatter/ScatterVis.tsx | 2 +- src/vis/scatter/utils.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vis/scatter/ScatterVis.tsx b/src/vis/scatter/ScatterVis.tsx index d14b94d3c..7c53fbe07 100644 --- a/src/vis/scatter/ScatterVis.tsx +++ b/src/vis/scatter/ScatterVis.tsx @@ -111,7 +111,7 @@ export function ScatterVis({ if (selectedList.length === 0 && config.showLabels === ELabelingOptions.SELECTED) { // @ts-ignore - p.data.selected.textfont.color = 'white'; + p.data.selected.textfont.color = `rgba(102, 102, 102, 0)`; } else if (selectedList.length === 0 && config.showLabels === ELabelingOptions.ALWAYS) { // @ts-ignore p.data.selected.textfont.color = `rgba(102, 102, 102, ${config.alphaSliderVal})`; diff --git a/src/vis/scatter/utils.ts b/src/vis/scatter/utils.ts index 27165983e..cddc1df4c 100644 --- a/src/vis/scatter/utils.ts +++ b/src/vis/scatter/utils.ts @@ -201,7 +201,7 @@ export async function createScatterTraces( size: sizeSliderVal, }, textfont: { - color: showLabels === ELabelingOptions.NEVER ? 'white' : '#666666', + color: showLabels === ELabelingOptions.NEVER ? `rgba(102, 102, 102, 0)` : `rgba(102, 102, 102, 1)`, }, }, unselected: { @@ -214,7 +214,7 @@ export async function createScatterTraces( size: sizeSliderVal, }, textfont: { - color: showLabels === ELabelingOptions.ALWAYS ? `rgba(179, 179, 179, ${alphaSliderVal})` : 'white', + color: showLabels === ELabelingOptions.ALWAYS ? `rgba(179, 179, 179, ${alphaSliderVal})` : `rgba(179, 179, 179, 0)`, }, }, },