Skip to content

Commit 517358b

Browse files
committed
update
1 parent 199dd5f commit 517358b

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

app_config.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,19 @@
112112
Output("y-picker-violin", "options"),
113113
]
114114

115+
DROPDOWN_OPTIONS_3D_XYZ = [
116+
Output("slider-picker-3d", "options"),
117+
Output("x-picker-3d", "options"),
118+
Output("y-picker-3d", "options"),
119+
Output("z-picker-3d", "options"),
120+
]
121+
122+
DROPDOWN_OPTIONS_3D_XYZ_REF = [
123+
Output("x-ref-picker-3d", "options"),
124+
Output("y-ref-picker-3d", "options"),
125+
Output("z-ref-picker-3d", "options"),
126+
]
127+
115128
# values for dropdown components with all the keys
116129
DROPDOWN_VALUES_ALL = [
117130
Output("c-picker-3d", "value"),
@@ -127,6 +140,19 @@
127140
Output("y-picker-violin", "value"),
128141
]
129142

143+
DROPDOWN_VALUES_3D_XYZ = [
144+
Output("slider-picker-3d", "value"),
145+
Output("x-picker-3d", "value"),
146+
Output("y-picker-3d", "value"),
147+
Output("z-picker-3d", "value"),
148+
]
149+
150+
DROPDOWN_VALUES_3D_XYZ_REF = [
151+
Output("x-ref-picker-3d", "value"),
152+
Output("y-ref-picker-3d", "value"),
153+
Output("z-ref-picker-3d", "value"),
154+
]
155+
130156
DROPDOWN_VALUES_ALL_STATE = [
131157
State("c-picker-3d", "value"),
132158
State("x-picker-2d-left", "value"),
@@ -141,6 +167,19 @@
141167
State("y-picker-violin", "value"),
142168
]
143169

170+
DROPDOWN_STATE_3D_XYZ = [
171+
State("slider-picker-3d", "value"),
172+
State("x-picker-3d", "value"),
173+
State("y-picker-3d", "value"),
174+
State("z-picker-3d", "value"),
175+
]
176+
177+
DROPDOWN_STATE_3D_XYZ_REF = [
178+
State("x-ref-picker-3d", "value"),
179+
State("y-ref-picker-3d", "value"),
180+
State("z-ref-picker-3d", "value"),
181+
]
182+
144183
# options for dropdown components with categorical keys
145184
DROPDOWN_OPTIONS_CAT = [
146185
Output("x-picker-violin", "options"),

layouts/view3d_card_layout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def get_3d_view_config_layout():
253253
)
254254
),
255255
id="3d-config-collapse",
256-
is_open=True,
256+
is_open=False,
257257
),
258258
width=12,
259259
),

view_callbacks/scatter_3d_view.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,36 @@ def get_scatter_3d_view_callbacks(app: dash.Dash) -> None:
8484
None
8585
"""
8686

87+
@app.callback(
88+
output={
89+
"is_open": Output("3d-config-collapse", "is_open"),
90+
},
91+
inputs={
92+
"n_clicks": Input("3d-config-more-button", "n_clicks"),
93+
},
94+
state={
95+
"is_open": State("3d-config-collapse", "is_open"),
96+
},
97+
)
98+
def toggle_3d_config_collapse(n_clicks: int, is_open: bool) -> dict:
99+
"""
100+
Toggle the visibility of the 3D configuration collapse panel.
101+
102+
Args:
103+
n_clicks (int): Number of times the more button has been clicked
104+
is_open (bool): Current state of the collapse panel
105+
106+
Returns:
107+
dict: Updated collapse panel state
108+
109+
Raises:
110+
PreventUpdate: If button has not been clicked
111+
"""
112+
if n_clicks == 0:
113+
raise PreventUpdate
114+
115+
return {"is_open": not is_open}
116+
87117
@app.callback(
88118
output={
89119
"scatter3d": Output("scatter3d", "figure", allow_duplicate=True),

0 commit comments

Comments
 (0)