diff --git a/optuna_dashboard/ts/components/GraphIntermediateValues.tsx b/optuna_dashboard/ts/components/GraphIntermediateValues.tsx index 7ccce6374..35c8345a9 100644 --- a/optuna_dashboard/ts/components/GraphIntermediateValues.tsx +++ b/optuna_dashboard/ts/components/GraphIntermediateValues.tsx @@ -85,20 +85,19 @@ const plotIntermediateValue = ( (iv) => iv.value !== "inf" && iv.value !== "-inf" && iv.value !== "nan" ) const isFeasible = trial.constraints.every((c) => c <= 0) - const name = `trial #${trial.number} ${ - trial.state === "Running" - ? "(running)" - : !isFeasible - ? " (infeasible)" - : "" - }` return { x: values.map((iv) => iv.step), y: values.map((iv) => iv.value), marker: { maxdisplayed: 10 }, mode: "lines+markers", type: "scatter", - name, + name: `trial #${trial.number} ${ + trial.state === "Running" + ? "(running)" + : !isFeasible + ? " (infeasible)" + : "" + }`, ...(!isFeasible && { line: { color: "#CCCCCC", dash: "dash" } }), } })