From 7b322c8bb886dbd5f6ee852ce077fca484018fed Mon Sep 17 00:00:00 2001 From: keisuke-umezawa Date: Sat, 19 Aug 2023 16:06:20 +0900 Subject: [PATCH] Only show legend with multiple studies in history plot --- optuna_dashboard/ts/components/GraphHistory.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optuna_dashboard/ts/components/GraphHistory.tsx b/optuna_dashboard/ts/components/GraphHistory.tsx index 0b77e563..280c02fc 100644 --- a/optuna_dashboard/ts/components/GraphHistory.tsx +++ b/optuna_dashboard/ts/components/GraphHistory.tsx @@ -206,7 +206,7 @@ const plotHistory = ( title: xAxis === "number" ? "Trial" : "Time", type: xAxis === "number" ? "linear" : "date", }, - showlegend: true, + showlegend: historyPlotInfos.length === 1 ? false : true, template: mode === "dark" ? plotlyDarkTemplate : {}, }