mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-22 13:20:38 +08:00
Refactor GraphSlice.tsx
This commit is contained in:
@@ -223,37 +223,19 @@ const plotSlice = (study: StudyDetail, objectiveId: number, xAxis: string) => {
|
||||
},
|
||||
},
|
||||
]
|
||||
updateLayout = {
|
||||
title: "Slice",
|
||||
margin: {
|
||||
l: 50,
|
||||
r: 50,
|
||||
updateLayout["xaxis"] = {
|
||||
title: paramName,
|
||||
zerolinecolor: "#f2f5fa",
|
||||
zerolinewidth: 1.5,
|
||||
linecolor: "#f2f5fa",
|
||||
linewidth: 5,
|
||||
gridcolor: "#f2f5fa",
|
||||
gridwidth: 1,
|
||||
tickfont: {
|
||||
color: "#000000",
|
||||
},
|
||||
xaxis: {
|
||||
title: paramName,
|
||||
zerolinecolor: "#f2f5fa",
|
||||
zerolinewidth: 1.5,
|
||||
linecolor: "#f2f5fa",
|
||||
linewidth: 5,
|
||||
gridcolor: "#f2f5fa",
|
||||
gridwidth: 1,
|
||||
tickfont: {
|
||||
color: "#000000",
|
||||
},
|
||||
tickvals: tickvals,
|
||||
ticktext: vocabArr,
|
||||
},
|
||||
yaxis: {
|
||||
title: "Objective Values",
|
||||
zerolinecolor: "#f2f5fa",
|
||||
zerolinewidth: 2,
|
||||
linecolor: "#f2f5fa",
|
||||
linewidth: 5,
|
||||
gridcolor: "#f2f5fa",
|
||||
gridwidth: 1,
|
||||
},
|
||||
plot_bgcolor: "#E5ecf6",
|
||||
showlegend: false,
|
||||
tickvals: tickvals,
|
||||
ticktext: vocabArr,
|
||||
}
|
||||
plotly.react(plotDomId, trace, updateLayout)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user