diff --git a/standalone_app/src/components/StudyDetail.tsx b/standalone_app/src/components/StudyDetail.tsx index ec37a2a0..42715824 100644 --- a/standalone_app/src/components/StudyDetail.tsx +++ b/standalone_app/src/components/StudyDetail.tsx @@ -173,7 +173,7 @@ export const StudyDetail: FC<{ - + {!!study && } diff --git a/tslib/react/src/components/PlotHistory.stories.tsx b/tslib/react/src/components/PlotHistory.stories.tsx index f274249e..159d836b 100644 --- a/tslib/react/src/components/PlotHistory.stories.tsx +++ b/tslib/react/src/components/PlotHistory.stories.tsx @@ -14,12 +14,13 @@ const meta: Meta = { (Story, storyContext) => { const { study } = useMockStudy(storyContext.parameters?.studyId) if (!study) return

loading...

+ const studies = [study] return ( diff --git a/tslib/react/src/components/PlotHistory.tsx b/tslib/react/src/components/PlotHistory.tsx index 6e235997..5bac6a18 100644 --- a/tslib/react/src/components/PlotHistory.tsx +++ b/tslib/react/src/components/PlotHistory.tsx @@ -84,6 +84,7 @@ export const PlotHistory: FC<{ } } + // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { if (graphComponentState !== "componentWillMount") { plotHistory( @@ -93,9 +94,16 @@ export const PlotHistory: FC<{ logScale, colorThemeUsed, markerSize - ) + )?.then(notifyGraphDidRender) } - }, [graphComponentState, studies, selected, logScale, xAxis, colorThemeUsed, markerSize]) + }, [ + historyPlotInfos, + selected, + xAxis, + colorThemeUsed, + markerSize, + graphComponentState, + ]) return ( @@ -122,8 +130,8 @@ export const PlotHistory: FC<{ value={selected.identifier()} onChange={handleObjectiveChange} > - {targets.map((t, i) => ( - + {targets.map((t) => ( + {t.toLabel(studies[0].metric_names)} ))} @@ -324,5 +332,5 @@ const plotHistory = ( }) } plotData.push(...infeasiblePlotData) - plotly.react(plotDomId, plotData, layout) + return plotly.react(plotDomId, plotData, layout) } diff --git a/tslib/react/src/components/PlotParallelCoordinate.stories.tsx b/tslib/react/src/components/PlotParallelCoordinate.stories.tsx index 42443339..58657abc 100644 --- a/tslib/react/src/components/PlotParallelCoordinate.stories.tsx +++ b/tslib/react/src/components/PlotParallelCoordinate.stories.tsx @@ -14,12 +14,13 @@ const meta: Meta = { (Story, storyContext) => { const { study } = useMockStudy(storyContext.parameters?.studyId) if (!study) return

loading...

+ const studies = [study] return ( diff --git a/tslib/react/test/PlotHistory.test.tsx b/tslib/react/test/PlotHistory.test.tsx index 3d121fae..15258406 100644 --- a/tslib/react/test/PlotHistory.test.tsx +++ b/tslib/react/test/PlotHistory.test.tsx @@ -18,7 +18,7 @@ describe("PlotHistory Tests", async () => { }) =>
{children}
return render( - + ) }