Skip to content

Commit 7df67af

Browse files
committed
Add data loading animation
1 parent 1dcc4fc commit 7df67af

File tree

5 files changed

+16
-110
lines changed

5 files changed

+16
-110
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ _build/
6161
_static
6262
_templates
6363

64+
/dygetviz/demo/

Diff for: dygetviz/demo/annotate_scatterplot.py

-73
This file was deleted.

Diff for: dygetviz/demo/get_gene_name.py

-24
This file was deleted.

Diff for: dygetviz/plot_dash.py

+14-9
Original file line numberDiff line numberDiff line change
@@ -216,16 +216,21 @@
216216
),
217217

218218
# Graph
219-
dcc.Graph(
220-
id='dygetviz',
221-
style={
222-
'width': '90%',
223-
'height': '700px',
224-
'box-shadow': '0 4px 6px rgba(0, 0, 0, 0.1)'
225-
# A subtle shadow for depth
226-
},
227-
className="text-center",
219+
dcc.Loading(
220+
id="loading-1", # You can use any unique ID
221+
type="default", # There are different types of loading spinners you can use
222+
children=dcc.Graph(
223+
id='dygetviz',
224+
style={
225+
'width': '90%',
226+
'height': '700px',
227+
'box-shadow': '0 4px 6px rgba(0, 0, 0, 0.1)'
228+
# A subtle shadow for depth
229+
},
230+
className="text-center",
231+
),
228232
),
233+
229234
# html.Div("✨: a category. \n\"(1)\": a node label.", id="note"),
230235

231236
# Store the nodes in `trajectory_names`

Diff for: dygetviz/plot_dtdg.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ def get_visualization_cache(dataset_name: str, device: str, model_name: str,
7979
reference_nodes = data["reference_nodes"]
8080
snapshot_names = data["snapshot_names"]
8181
z = data["z"]
82-
83-
DEBUG = False
84-
8582
visual_dir = osp.join("outputs", "visual", dataset_name)
8683

8784
# Enable this line if we want to include all trajectories when we generate the visualization cache (*.json) files.
@@ -411,7 +408,7 @@ def adjust_node_color_size(fig):
411408

412409
fig_line.data[0].hovertemplate = get_hovertemplate(
413410
fields_in_customdata=fields, is_trajectory=True)
414-
print(get_hovertemplate(fields_in_customdata=fields, is_trajectory=True))
411+
415412
for frame in traces_of_line:
416413
frame.line.color = colors[idx]
417414
frame.line.width = 5

0 commit comments

Comments
 (0)