diff --git a/optuna_dashboard/static/components/GraphSlice.tsx b/optuna_dashboard/static/components/GraphSlice.tsx index 0ae8db2c..c2cb3204 100644 --- a/optuna_dashboard/static/components/GraphSlice.tsx +++ b/optuna_dashboard/static/components/GraphSlice.tsx @@ -125,16 +125,21 @@ export const GraphSlice: FC<{ color: "#185799" } } - updatelayout["xaxis2"] = { - title: paramName, - zerolinecolor: "#f2f5fa", - zerolinewidth: 1.5, - linecolor: "#f2f5fa", - linewidth: 5, - gridcolor: "#f2f5fa", - gridwidth:1, - - } + + type foo = keyof plotly.Layout + //@ts-ignore + const axisname:foo = `xaxis${i}` + //@ts-ignore + updatelayout[axisname] = { + title: paramName, + zerolinecolor: "#f2f5fa", + zerolinewidth: 1.5, + linecolor: "#f2f5fa", + linewidth: 5, + gridcolor: "#f2f5fa", + gridwidth:1, + } + } traces.push(trace) i++