diff --git a/optuna_dashboard/ts/components/GraphHistory.tsx b/optuna_dashboard/ts/components/GraphHistory.tsx
index c1b3b40d..6d90191b 100644
--- a/optuna_dashboard/ts/components/GraphHistory.tsx
+++ b/optuna_dashboard/ts/components/GraphHistory.tsx
@@ -8,13 +8,14 @@ export const GraphHistory: FC<{
studies: StudyDetail[]
logScale: boolean
includePruned: boolean
-}> = ({ studies, logScale }) => {
+}> = ({ studies, logScale, includePruned }) => {
const theme = useTheme()
const colorTheme = usePlotlyColorTheme(theme.palette.mode)
return (
)
diff --git a/tslib/react/src/components/PlotHistory.tsx b/tslib/react/src/components/PlotHistory.tsx
index d04aa716..968651af 100644
--- a/tslib/react/src/components/PlotHistory.tsx
+++ b/tslib/react/src/components/PlotHistory.tsx
@@ -37,10 +37,9 @@ interface HistoryPlotInfo {
export const PlotHistory: FC<{
studies: Optuna.Study[]
logScale?: boolean
+ includePruned?: boolean
colorTheme?: Partial
-}> = ({ studies, logScale, colorTheme }) => {
- const filterPrunedTrial = false
-
+}> = ({ studies, logScale, includePruned, colorTheme }) => {
const { graphComponentState, notifyGraphDidRender } = useGraphComponentState()
const theme = useTheme()
@@ -52,6 +51,8 @@ export const PlotHistory: FC<{
>("number")
const [logScaleInternal, setLogScaleInternal] = useState(false)
+ const [includePrunedInternal, setIncludePrunedInternal] =
+ useState(true)
const [markerSize, setMarkerSize] = useState(5)
@@ -61,7 +62,7 @@ export const PlotHistory: FC<{
const trials = useFilteredTrialsFromStudies(
studies,
[selected],
- filterPrunedTrial
+ includePruned === undefined ? !includePrunedInternal : !includePruned
)
const historyPlotInfos = studies.map((study, index) => {
@@ -82,6 +83,10 @@ export const PlotHistory: FC<{
setLogScaleInternal(!logScaleInternal)
}
+ const handleIncludePrunedChange = () => {
+ setIncludePrunedInternal(!includePrunedInternal)
+ }
+
const handleXAxisChange = (e: ChangeEvent) => {
if (e.target.value === "number") {
setXAxis("number")
@@ -189,6 +194,19 @@ export const PlotHistory: FC<{
/>
) : null}
+ {includePruned === undefined ? (
+
+ Include PRUNED trials:
+
+
+ ) : null}
Marker size: