graph_widget 0.1.12__tar.gz → 0.1.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {graph_widget-0.1.12 → graph_widget-0.1.13}/PKG-INFO +1 -1
- {graph_widget-0.1.12 → graph_widget-0.1.13}/example_2.py +5 -16
- {graph_widget-0.1.12 → graph_widget-0.1.13}/pyproject.toml +1 -1
- {graph_widget-0.1.12 → graph_widget-0.1.13}/src/graph_widget/static/widget.js +2 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/uv.lock +1 -1
- {graph_widget-0.1.12 → graph_widget-0.1.13}/.gitignore +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/.python-version +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/README.md +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/README_DEV.md +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/bug_test.py +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/data.json +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/dev.py +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/graph_3d_example.py +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/multi_mst.json +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/src/graph_widget/__init__.py +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/src/graph_widget/dev.py +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/src/graph_widget/static/widget.css +0 -0
- {graph_widget-0.1.12 → graph_widget-0.1.13}/vis-forge-marimo.py +0 -0
|
@@ -14,10 +14,10 @@ def _():
|
|
|
14
14
|
@app.cell
|
|
15
15
|
def _():
|
|
16
16
|
data = {'nodes':
|
|
17
|
-
[{"id": 1, "kind": "sample", "value": -15},
|
|
18
|
-
{"id": 2, "kind": "sample", "value": 0},
|
|
19
|
-
{"id": 3, "kind": "OTU", "degree": 3, "value": 23},
|
|
20
|
-
{"id": 4, "kind": "OTU", "degree": 2, "value": 1},
|
|
17
|
+
[{"id": 1, "kind": "sample", "value": -15, "label": "node 1"},
|
|
18
|
+
{"id": 2, "kind": "sample", "value": 0, "label": "node 2"},
|
|
19
|
+
{"id": 3, "kind": "OTU", "degree": 3, "value": 23, "label": "node 3"},
|
|
20
|
+
{"id": 4, "kind": "OTU", "degree": 2, "value": 1, "label": "node 4"},
|
|
21
21
|
{"id": 5, "kind": "OTU", "degree": 3, "value": 17}],
|
|
22
22
|
"links": [
|
|
23
23
|
{"source": 1, "target": 3},
|
|
@@ -61,7 +61,7 @@ def _(data, graph_widget, mo):
|
|
|
61
61
|
node_scale=2,
|
|
62
62
|
colour_feature="",
|
|
63
63
|
colour_scale_type="",
|
|
64
|
-
height=
|
|
64
|
+
height=600,
|
|
65
65
|
width=600
|
|
66
66
|
)
|
|
67
67
|
)
|
|
@@ -126,16 +126,5 @@ def _(data, selected):
|
|
|
126
126
|
return (filtered_nodes,)
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
@app.cell
|
|
130
|
-
def _(data):
|
|
131
|
-
type(data)
|
|
132
|
-
return
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
@app.cell
|
|
136
|
-
def _():
|
|
137
|
-
return
|
|
138
|
-
|
|
139
|
-
|
|
140
129
|
if __name__ == "__main__":
|
|
141
130
|
app.run()
|
|
@@ -66,6 +66,7 @@ function render({ model, el }) {
|
|
|
66
66
|
.d3AlphaDecay(0.001)
|
|
67
67
|
.minZoom(0.001)
|
|
68
68
|
.nodeCanvasObjectMode(() => 'replace')
|
|
69
|
+
.nodeLabel('label')
|
|
69
70
|
.onEngineStop(() => {
|
|
70
71
|
plot.zoomToFit(400);
|
|
71
72
|
create_rtree(data["nodes"]);
|
|
@@ -221,6 +222,7 @@ function render({ model, el }) {
|
|
|
221
222
|
// ? d[colour_feature] // Use the hash string directly
|
|
222
223
|
// : colour_scale(d[colour_feature])})
|
|
223
224
|
})
|
|
225
|
+
|
|
224
226
|
model.on("change:selected_ids", () => {
|
|
225
227
|
global_selected_ids = model.get("selected_ids");
|
|
226
228
|
plot.nodeColor((d) =>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|