From f00bf793828eaa2b894456f6662b94fefb866f75 Mon Sep 17 00:00:00 2001 From: adkinsrs Date: Mon, 12 Aug 2024 10:47:17 -0400 Subject: [PATCH] (#855) Resolving and closing --- www/js/dataset_curator.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/www/js/dataset_curator.js b/www/js/dataset_curator.js index 88784845..8e0f926b 100644 --- a/www/js/dataset_curator.js +++ b/www/js/dataset_curator.js @@ -1121,15 +1121,16 @@ const setupPlotlyOptions = async () => { const difference = (arr1, arr2) => arr1.filter(x => !arr2.includes(x)) const continuousColumns = difference(allColumns, catColumns); - // class name, list of columns, add expression, default category - const xColumns = ["bar", "violin"].includes(plotType) ? catColumns : allColumns; const xUseRaw = ["bar", "violin"].includes(plotType) ? false : true; const yColumns = ["bar", "violin"].includes(plotType) ? continuousColumns : allColumns; + const colorColumns = ["bar", "line", "violin"].includes(plotType) ? catColumns : allColumns; + const colorUseRaw = ["bar", "line", "violin"].includes(plotType) ? false : true; + // Arguments - class name, list of columns, add expression, default category updateSeriesOptions("js-plotly-x-axis", xColumns, xUseRaw); updateSeriesOptions("js-plotly-y-axis", yColumns, true, "raw_value"); - updateSeriesOptions("js-plotly-color", allColumns, true); + updateSeriesOptions("js-plotly-color", colorColumns, colorUseRaw); updateSeriesOptions("js-plotly-label", allColumns, true); updateSeriesOptions("js-plotly-facet-row", catColumns, false); updateSeriesOptions("js-plotly-facet-col", catColumns, false);