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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graph_widget
3
- Version: 0.1.12
3
+ Version: 0.1.13
4
4
  Requires-Dist: anywidget
5
5
  Requires-Dist: marimo
6
6
  Description-Content-Type: text/markdown
@@ -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=200,
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()
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "graph_widget"
7
- version = "0.1.12"
7
+ version = "0.1.13"
8
8
  dependencies = ["anywidget","marimo"]
9
9
  readme = "README.md"
10
10
 
@@ -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) =>
@@ -99,7 +99,7 @@ wheels = [
99
99
 
100
100
  [[package]]
101
101
  name = "graph-widget"
102
- version = "0.1.11"
102
+ version = "0.1.12"
103
103
  source = { editable = "." }
104
104
  dependencies = [
105
105
  { name = "anywidget" },
File without changes
File without changes
File without changes
File without changes
File without changes