mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-10-30 13:30:17 +08:00
Update to not redirect when selecting lines
This commit is contained in:
1 parent
37f0709bc8
commit
475eaa78e1
1 file changed
+8
-6
@@ -73,12 +73,14 @@ export const GraphHistory: FC<{
|
||||
if (element != null && studies.length >= 1) {
|
||||
// @ts-ignore
|
||||
element.on("plotly_click", function (data) {
|
||||
const link =
|
||||
URL_PREFIX +
|
||||
`/studies/${
|
||||
studies[Math.floor(data.points[0].curveNumber / 2)].id
|
||||
}/trials?numbers=${data.points[0].x}`
|
||||
window.location.href = link
|
||||
if (data.points[0].data.mode !== "lines") {
|
||||
const link =
|
||||
URL_PREFIX +
|
||||
`/studies/${
|
||||
studies[Math.floor(data.points[0].curveNumber / 2)].id
|
||||
}/trials?numbers=${data.points[0].x}`
|
||||
window.location.href = link
|
||||
}
|
||||
})
|
||||
return () => {
|
||||
// @ts-ignore
|
||||
|
||||
Reference in new issue
Block a user