diff --git a/optuna_dashboard/ts/components/GraphRank.tsx b/optuna_dashboard/ts/components/GraphRank.tsx index 1267da81..527b71a0 100644 --- a/optuna_dashboard/ts/components/GraphRank.tsx +++ b/optuna_dashboard/ts/components/GraphRank.tsx @@ -29,8 +29,8 @@ interface RankPlotInfo { ytitle: string xtype: plotly.AxisType ytype: plotly.AxisType - xvalues: (string | number | boolean)[] - yvalues: (string | number | boolean)[] + xvalues: (string | number)[] + yvalues: (string | number)[] colors: number[] is_feasible: boolean[] hovertext: string[] @@ -213,8 +213,8 @@ const getRankPlotInfo = ( const xAxis = getAxisInfo(filteredTrials, xParam) const yAxis = getAxisInfo(filteredTrials, yParam) - let xValues: (string | number | boolean)[] = [] - let yValues: (string | number | boolean)[] = [] + let xValues: (string | number)[] = [] + let yValues: (string | number)[] = [] const zValues: number[] = [] const isFeasible: boolean[] = [] const hovertext: string[] = [] @@ -349,12 +349,8 @@ const plotRank = ( template: colorTheme, } - const xValues = rankPlotInfo.xvalues.map((value) => - typeof value === "boolean" ? (value ? 1 : 0) : value - ) - const yValues = rankPlotInfo.yvalues.map((value) => - typeof value === "boolean" ? (value ? 1 : 0) : value - ) + const xValues = rankPlotInfo.xvalues + const yValues = rankPlotInfo.yvalues const plotData: Partial[] = [ { diff --git a/tslib/react/src/utils/graph.ts b/tslib/react/src/utils/graph.ts index e996431e..2572c75d 100644 --- a/tslib/react/src/utils/graph.ts +++ b/tslib/react/src/utils/graph.ts @@ -7,7 +7,7 @@ export type AxisInfo = { isLog: boolean isCat: boolean indices: (string | number)[] - values: (string | number | boolean | null)[] + values: (string | number | null)[] } // biome-ignore lint/suspicious/noExplicitAny: Accept any array.