Set uirevision to prevent reetting charts

This commit is contained in:
c-bata
2023-04-13 11:56:27 +09:00
parent 21134cfc36
commit ab7dfbc27b
8 changed files with 8 additions and 0 deletions
@@ -230,6 +230,7 @@ const plotContour = (
r: 50,
b: 50,
},
uirevision: 'true',
template: mode === "dark" ? plotlyDarkTemplate : {},
}
plotly.react(plotDomId, plotData, layout)
@@ -131,6 +131,7 @@ const plotEdf = (
r: 50,
b: 50,
},
uirevision: 'true',
template: mode === "dark" ? plotlyDarkTemplate : {},
}
@@ -232,6 +232,7 @@ const plotHistory = (
type: xAxis === "number" ? "linear" : "date",
},
showlegend: true,
uirevision: 'true',
template: mode === "dark" ? plotlyDarkTemplate : {},
}
if (trials.length === 0) {
@@ -82,6 +82,7 @@ const plotParamImportancesBeta = (
barmode: "group",
bargap: 0.15,
bargroupgap: 0.1,
uirevision: 'true',
template: mode === "dark" ? plotlyDarkTemplate : {},
}
@@ -146,6 +146,7 @@ const plotIntermediateValue = (
title: "Step",
type: "linear",
},
uirevision: 'true',
template: mode === "dark" ? plotlyDarkTemplate : {},
}
if (trials.length === 0) {
@@ -144,6 +144,7 @@ const plotCoordinate = (
b: 100,
},
template: mode === "dark" ? plotlyDarkTemplate : {},
uirevision: 'true',
}
if (trials.length === 0 || targets.length === 0) {
plotly.react(plotDomId, [], layout)
@@ -183,6 +183,7 @@ const plotParetoFront = (
b: 0,
},
template: mode === "dark" ? plotlyDarkTemplate : {},
uirevision: 'true',
}
const trials: Trial[] = study ? study.trials : []
@@ -177,6 +177,7 @@ const plotSlice = (
automargin: true,
},
showlegend: false,
uirevision: 'true',
template: mode === "dark" ? plotlyDarkTemplate : {},
}
if (