diff --git a/optuna_dashboard/ts/components/GraphParetoFront.tsx b/optuna_dashboard/ts/components/GraphParetoFront.tsx index e5143b5c..457ab875 100644 --- a/optuna_dashboard/ts/components/GraphParetoFront.tsx +++ b/optuna_dashboard/ts/components/GraphParetoFront.tsx @@ -109,9 +109,10 @@ const makeScatterObject = ( objectiveYId: number, hovertemplate: string, dominated: boolean, - feasible: boolean + feasible: boolean, + mode: string ): Partial => { - const marker = makeMarker(trials, dominated, feasible) + const marker = makeMarker(trials, dominated, feasible, mode) return { x: trials.map((t) => t.values![objectiveXId] as number), y: trials.map((t) => t.values![objectiveYId] as number), @@ -126,7 +127,8 @@ const makeScatterObject = ( const makeMarker = ( trials: Trial[], dominated: boolean, - feasible: boolean + feasible: boolean, + mode: string ): Partial => { if (feasible && dominated) { return { @@ -154,7 +156,7 @@ const makeMarker = ( } else { return { // @ts-ignore - color: "#cccccc", + color: mode === "dark" ? "#666666" : "#cccccc", } } } @@ -234,7 +236,8 @@ const plotParetoFront = ( ? "%{text}Trial" : "%{text}Feasible Trial", true, - true + true, + mode ), makeScatterObject( feasibleTrials.filter((t, i) => !dominatedTrials[i]), @@ -242,7 +245,8 @@ const plotParetoFront = ( objectiveYId, "%{text}Best Trial", false, - true + true, + mode ), makeScatterObject( infeasibleTrials, @@ -250,7 +254,8 @@ const plotParetoFront = ( objectiveYId, "%{text}Infeasible Trial", false, - false + false, + mode ), ]