From fb7c5e00848504e7838c0a347959b5591ad56972 Mon Sep 17 00:00:00 2001 From: Martha King Date: Tue, 1 Oct 2024 16:56:32 +0100 Subject: [PATCH] remove colour list and improve buttton label --- .../visualizations/ScatterplotVisualization.vue | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/gui2/src/components/visualizations/ScatterplotVisualization.vue b/app/gui2/src/components/visualizations/ScatterplotVisualization.vue index 5c2c8b00d3..c0783e12da 100644 --- a/app/gui2/src/components/visualizations/ScatterplotVisualization.vue +++ b/app/gui2/src/components/visualizations/ScatterplotVisualization.vue @@ -332,10 +332,6 @@ const yLabelText = computed(() => { } else return null }) -const colorList = computed(() => - isCustomColorAndAxis.value ? ['red', 'green'] : d3.schemeCategory10, -) - watchEffect(() => { const boundsExpression = bounds.value != null ? Ast.Vector.tryBuild(bounds.value, tryNumberToEnso) : undefined @@ -647,7 +643,7 @@ watchPostEffect(() => { const plotData = getPlotData(data.value) as Point[] const series = Object.keys(data.value.axis).filter((s) => s != 'x') const colorScale = (d: string) => { - const color = d3.scaleOrdinal(colorList.value).domain(series) + const color = d3.scaleOrdinal(d3.schemeCategory10).domain(series) if (data.value.is_multi_series) { return color(d) } @@ -692,7 +688,7 @@ watchPostEffect(() => { const color = d3 .scaleOrdinal() .domain(seriesLabels.value) - .range(colorList.value) + .range(d3.schemeCategory10) .domain(seriesLabels.value) d3Legend.value.selectAll('circle').remove() @@ -816,7 +812,7 @@ config.setToolbar([ }, { selected: yAxisSelected, - title: 'Y Axis Label', + title: 'Choose Y Axis Label', options: { none: { icon: 'not_paragraph',