Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/make link in node label clickable #161

Open
wants to merge 129 commits into
base: feature/make-link-in-node-label-clickable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
2f64dd3
Merge pull request #12 from WestHealth/feature/make-link-in-node-labe…
boludo00 May 24, 2018
6487817
version 0.1.4 supports loading bar for nets of > 100 nodes, revamped …
May 24, 2018
af27f66
removed print statement in docs
May 24, 2018
44ead13
modified how the template reads json, avoiding python types making th…
Jun 26, 2018
edd2fe2
small fix for iterating through int type node titles
Jun 26, 2018
5b7393d
Merge pull request #14 from WestHealth/hotfix/i13-network-vis-fails-a…
boludo00 Jun 26, 2018
271608a
updating version for small fix
Jun 26, 2018
22184cd
Fixed small typo; added csv download for DataFrame
glen-kurtz Aug 8, 2018
35d6c81
Merge pull request #15 from glen-kurtz/patch-1
boludo00 Aug 8, 2018
9ab7183
adding missing module
Dec 5, 2018
af16b29
Defaulting directed graph edges to point to destination node
Dec 6, 2018
9aba20a
Merge pull request #21 from WestHealth/18-drawing-wrong-arrow-directions
boludo00 Dec 6, 2018
7e87fdc
added check for bidirectional edge adding
Dec 6, 2018
b45de26
Merge pull request #22 from WestHealth/19-bidirectional-dependencies
boludo00 Dec 6, 2018
0237a34
added support for versioning. Can now access pyvis.__version__
Dec 6, 2018
3bc7b44
version 1.5.0 change. This version got rid of bugs regarding the dire…
Dec 6, 2018
1faf4b6
jinja2 2.8 was breaking on python 3.7 when displaying graph
Mar 7, 2019
761ce90
added support for more int like node dtypes
Mar 7, 2019
bcb350f
wrong logic in test
Mar 7, 2019
e57c353
Merge pull request #26 from WestHealth/hotfix/24-Empty-AssertionError…
boludo00 Mar 7, 2019
85f2b43
bump version
Mar 8, 2019
18ddbfb
Merge branch 'master' of github.com:WestHealth/pyvis
Mar 8, 2019
4d159a5
added layout structure to represent visjs layout obj
Mar 11, 2019
2679816
add layout to init
Mar 11, 2019
30ac802
add tests for new layout
Mar 11, 2019
e218440
Merge pull request #28 from WestHealth/feature/27-add-layout-support
boludo00 Mar 12, 2019
aa75cf9
bump version introducing heirarchical layout
Mar 12, 2019
2229ea1
fixed some docs and rename method
Mar 12, 2019
701b02b
documentation on classes
Mar 12, 2019
2903e7c
add dynamic versioning
Mar 12, 2019
0256fbe
autodoc includes options
Mar 12, 2019
b808390
adding notebook with examples
Apr 11, 2019
2c13d3f
Update readme with binder
Apr 11, 2019
aa71a2a
pushing notebook
Apr 11, 2019
41cf502
update requirements for pandas (needed for notebook example)
Apr 11, 2019
03c85c4
consistent ipython version in requirements.txt and setup.py
bistaumanga May 18, 2019
9956e1b
allow periods in filepath by making isHTML? checks smarter
aalok-sathe Jun 17, 2019
bdfd9ce
redundant node shape override
Jul 8, 2019
1070de9
ignore files
Jul 8, 2019
70fa421
handle overriding of options
Jul 8, 2019
91f1491
initial options set implmentation
Jul 8, 2019
8773ed9
Merge pull request #40 from WestHealth/feature/30-options-as-dictionary
Jul 8, 2019
d07769b
Merge pull request #35 from aalok-sathe/patch-1
Jul 9, 2019
a69f5a7
Merge pull request #33 from bistaumanga/master
Jul 9, 2019
698fd72
updated gitignore
Jul 26, 2019
233a08d
bump version
Jul 26, 2019
6b4434a
update documentation
Jul 26, 2019
719b139
show loading bar only when physics enabled
Nanoseb Aug 28, 2019
742c126
fix typo in template
Nanoseb Aug 28, 2019
b6a3d4d
Merge pull request #44 from Nanoseb/master
Aug 29, 2019
3a1b20b
fix toggle_physics documentation
Nanoseb Aug 29, 2019
c826440
Merge pull request #46 from Nanoseb/master
Aug 30, 2019
077e3f0
Fixed typos
jbednar Sep 10, 2019
f268ffe
Merge pull request #47 from jbednar/typofix
Sep 11, 2019
e77fa3a
update License
Nov 21, 2019
54aca00
update license
Nov 25, 2019
237e1c9
Fix broken link
sviperm Apr 18, 2020
a70c5ab
fixes issues: Network.from_nx doesn't inherit all properties #45 and …
nocluebutalotofit Jun 4, 2020
fc5a7b5
fixes issues: Network.from_nx doesn't inherit all properties #45 and …
nocluebutalotofit Jun 4, 2020
d119b29
Merge remote-tracking branch 'origin/master'
nocluebutalotofit Jun 4, 2020
004a9a5
deleted sys.path.append() ...
nocluebutalotofit Jun 4, 2020
84441ac
Merge pull request #61 from sviperm/patch-1
Jun 4, 2020
2755fd5
Merge pull request #63 from nocluebutalotofit/master
Jun 4, 2020
96005cd
update test with updated method name
Jun 4, 2020
e6a3514
bump version
Jun 4, 2020
6524363
update docs for new networkx integration
Jun 4, 2020
34edef2
separate div names
Jun 4, 2020
5ecf5b6
forgot to update div
Jun 4, 2020
0ad7b72
to_json method uses jsonpickler
Jun 29, 2020
6bd866e
hotfix for tojson method
Jun 29, 2020
b3993e7
fixes #64
Jun 29, 2020
5d1afd2
post-release, address maxdepth in to_json
Jun 29, 2020
f111d90
Implemented ability to add custom headers on top of graph output
WilsonHChung Jul 28, 2020
c42dad7
fix: added jsonpickple to setup.py
Aug 3, 2020
faa4b58
Merge pull request #68 from GalenWong/jsonpickle-dependency
Aug 3, 2020
4df52be
Merge pull request #67 from WilsonHChung/master
Aug 3, 2020
280d91a
bump version
Aug 3, 2020
602c01b
Fixes an issue where the graph output displays "None" as the heading …
WilsonHChung Aug 6, 2020
ceaeb69
Added a visual blinking effect for a specified node
WilsonHChung Aug 10, 2020
c511940
Update template.html
WilsonHChung Aug 10, 2020
b49d43e
Merge pull request #70 from WilsonHChung/master
Aug 12, 2020
cda4599
fix typo
inaokay-Faber Dec 22, 2020
772d290
add method to get node by ID
Mar 2, 2021
ceee27a
update docs for get node
Mar 2, 2021
72872c0
rearrange docstring
Mar 2, 2021
5fa5acd
bump version
Mar 2, 2021
2906996
cleanup and fixed link redirects
jhunpingco Mar 5, 2021
523d541
cleanup and fixed link redirects
jhunpingco Mar 5, 2021
fbc21ac
Fixes bug in random seed handling
HenningTimm Apr 27, 2021
b6495b8
Merge pull request #77 from inaokay-Faber/fix-typo
Apr 29, 2021
4c52130
Merge pull request #90 from HenningTimm/patch-1
Apr 29, 2021
db5c532
Updates link to Vis.js Network examples
amarvin May 28, 2021
872f263
add shape
khuyentran1401 Jun 16, 2021
158a34d
tests: fix get_network_data
erictapen Jun 22, 2021
a2481cc
Allow custom 'arrows' options for directed graphs
IngoKl Jun 23, 2021
d501e6a
Added type numpy.integer in Network.add_node
artemk1337 Aug 10, 2021
3558dcc
Adding a function to generate HTML from a graph, so that it can be us…
Pierre-VF Aug 14, 2021
20cf2d5
Merge pull request #97 from amarvin/patch-1
jhunpingco Oct 20, 2021
0703ec0
Merge pull request #100 from khuyentran1401/master
jhunpingco Oct 20, 2021
144d240
Merge pull request #101 from erictapen/fix-test-get-network-data
jhunpingco Oct 21, 2021
1215204
Merge pull request #112 from artemk1337/patch-2
jhunpingco Oct 21, 2021
4a045e5
Merge pull request #114 from Pierre-VF/feature/generate_html_str
jhunpingco Oct 21, 2021
6c33683
created CONTRIBUTING.md
jhunpingco Nov 1, 2021
c694ce4
more CONTRIBUTING.md
jhunpingco Nov 1, 2021
3c6e740
more contributing.md
jhunpingco Nov 1, 2021
a3f1427
change from enable_physics to toggle_physics
pbayerle Dec 13, 2021
3865122
Merge pull request #124 from pbayerle/patch-1
jhunpingco Dec 14, 2021
b11d105
Merge pull request #102 from IngoKl/master
jhunpingco Dec 14, 2021
9fb8f72
from_nx() updated to show edge weights by default
olive004 Dec 24, 2021
9e8dd39
from_nx() updated to show edge weights by default
olive004 Dec 24, 2021
7863a07
Merge pull request #126 from olive004/show_edge_weights
jhunpingco Feb 8, 2022
abc5150
Fix pop-up position when html is used in title
szobov Feb 23, 2022
8c72af7
Merge pull request #133 from szobov/fix-edges-pop-ups-html
jhunpingco Apr 12, 2022
c0be2ee
updated setup.py
jhunpingco Apr 12, 2022
1465559
Merge branch 'master' of github.com:WestHealth/pyvis
jhunpingco Apr 12, 2022
99d13fa
Update vis-network to latest
Darkproduct Apr 12, 2022
4329022
Fix https://github.com/WestHealth/pyvis/issues/128
Darkproduct Apr 12, 2022
0a093d3
Remove junk
Darkproduct Apr 12, 2022
ab0f9a2
Use default edges of visjs
Darkproduct Apr 12, 2022
c31b826
Fix notebook and add dot file example
Darkproduct Apr 12, 2022
f58091d
Fix https://github.com/WestHealth/pyvis/issues/129 and add example
Darkproduct Apr 12, 2022
1970fae
updated version
jhunpingco Apr 14, 2022
ea5a9e1
update setup.py
jhunpingco Apr 14, 2022
65d58ce
update setup.py for pypi versioning
jhunpingco Apr 14, 2022
e081bcc
cleanup for new pypi release
jhunpingco Apr 14, 2022
6438912
Merge pull request #137 from Darkproduct/feature/dot-file-options
jhunpingco Apr 14, 2022
eaa24b8
fixed test_graph.py for default g.options.edges.smooth.type
jhunpingco Apr 15, 2022
9275d43
Pulled with origin/master, added jetbrains IDE specific files to
smulhern18 Jul 12, 2022
3fd7384
Added in more extensive testing for hrefs in the node titles. Actually
smulhern18 Jul 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# binaries
*.pyc
.cache/
.coverage

# notebook checkpoints
.ipynb_checkpoints/
notebooks/.ipynb_checkpoints

# test related
.pytest_cache/
pyvis/test.py

# local files
pyvis/full_graph.txt
pyvis/source/stormofswords.csv

# package details
pyvis.egg-info/
build/
dist/
pyvis/make.bat

# vscode specific
.vscode/
venv

# jetbrains specific files
.idea
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Pull Requests

Here are some guidelines for pull requests:

* All work is submitted via Pull Requests.
* Pull Requests can be submitted as soon as there is code worth discussing. The worst case is that the PR is closed.
* Pull Requests should be made against master
* Pull Requests should be tested, if feasible:
- bugfixes should include regression tests.
- new behavior should at least get minimal exercise.
- new features should include a screenshot
* Don't make 'cleanup' pull requests just to change code style. We don't follow any style guide strictly, and we consider formatting changes unnecessary noise. If you're making functional changes, you can clean up the specific pieces of code you're working on.

Pyvis wraps vis.js so JavaScript functionality issues should be directed at the main `vis.js` project.

# Other contributions

Outside of Pull Requests (PRs), we welcome additions/corrections/clarification to the existing documentation as contributions at least as valuable as code submissions.
2 changes: 1 addition & 1 deletion LICENSE_BSD.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

- Neither the name of Thomas J Bradley nor the names of its contributors may
- Neither the name of West Health Institute nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ python setup.py install

[ipython](https://ipython.org/ipython-doc/2/install/install.html)

[jsonpickle](https://jsonpickle.github.io/)

## Quick Start
The most basic use case of a pyvis instance is to create a Network object and invoke methods:

Expand All @@ -37,4 +39,7 @@ g.add_node(0)
g.add_node(1)
g.add_edge(0, 1)
g.show("basic.html")
```
```

## Interactive Notebook playground with examples
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/WestHealth/pyvis/master?filepath=notebooks%2Fexample.ipynb)
84 changes: 84 additions & 0 deletions notebooks/dot.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vis-network@latest/styles/vis-network.css" type="text/css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vis-network@latest/dist/vis-network.min.js"> </script>
<center>
<h1></h1>
</center>

<!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
<script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->

<style type="text/css">

#mynetwork {
width: 500px;
height: 500px;
background-color: #ffffff;
border: 1px solid lightgray;
position: relative;
float: left;
}






</style>

</head>

<body>
<div id = "mynetwork"></div>


<script type="text/javascript">

// initialize global variables.
var edges;
var nodes;
var network;
var container;
var options, data;


// This method is responsible for drawing the graph, returns the drawn network
function drawGraph() {
var container = document.getElementById('mynetwork');



var DOTstring = "digraph { a [label=12, entity_id=12, entity_class=\"truck\"]; b [label=7, entity_id=7,entity_class=\"bike\"]; c [label=3, entity_id=3, entity_class=\"car\"]; a -> b[label=\"solid edge\"]; a -> b [label=\"dashed edge\", style=dashed]; a -> c [label=\"dashed edge\", style=dashed]; a -> c [label=\"dotted edge\", style=dotted]; }";
data = vis.network.dotparser.DOTToGraph(DOTstring);

var options = data.options;
options = Object.assign(options, {
nodes: {
shape: "dot"
},
});

options = Object.assign(options, {"physics": {"enabled": true, "barnesHut": {"theta": 0.5, "gravitationalConstant": -2000, "centralGravity": 0.3, "springLength": 200, "springConstant": 0.04, "damping": 0.09, "avoidOverlap": 0}, "maxVelocity": 50, "minVelocity": 0.1, "solver": "barnesHut", "stabilization": {"enabled": true, "iterations": 1000, "updateInterval": 100, "onlyDynamicEdges": false, "fit": true}}})






network = new vis.Network(container, data, options);






return network;

}

drawGraph();

</script>
</body>
</html>
108 changes: 108 additions & 0 deletions notebooks/example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vis-network@latest/styles/vis-network.css" type="text/css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vis-network@latest/dist/vis-network.min.js"> </script>
<center>
<h1></h1>
</center>

<!-- <link rel="stylesheet" href="../node_modules/vis/dist/vis.min.css" type="text/css" />
<script type="text/javascript" src="../node_modules/vis/dist/vis.js"> </script>-->

<style type="text/css">

#mynetwork {
width: 500px;
height: 500px;
background-color: #ffffff;
border: 1px solid lightgray;
position: relative;
float: left;
}






</style>

</head>

<body>
<div id = "mynetwork"></div>


<script type="text/javascript">

// initialize global variables.
var edges;
var nodes;
var network;
var container;
var options, data;


// This method is responsible for drawing the graph, returns the drawn network
function drawGraph() {
var container = document.getElementById('mynetwork');



// parsing and collecting nodes and edges from the python
nodes = new vis.DataSet([{"id": 0, "label": 0, "shape": "dot"}, {"id": 1, "label": 1, "shape": "dot"}, {"id": 2, "label": 2, "shape": "dot"}, {"id": 3, "label": 3, "shape": "dot"}, {"id": 4, "label": 4, "shape": "dot"}]);
edges = new vis.DataSet([{"from": 0, "to": 2}, {"from": 0, "to": 3}, {"from": 0, "to": 4}, {"from": 1, "to": 1}, {"from": 1, "to": 3}, {"from": 1, "to": 2}]);

// adding nodes and edges to the graph
data = {nodes: nodes, edges: edges};

var options = {
"configure": {
"enabled": false
},
"edges": {
"color": {
"inherit": true
},
"smooth": {
"enabled": true,
"type": "dynamic"
}
},
"interaction": {
"dragNodes": true,
"hideEdgesOnDrag": false,
"hideNodesOnDrag": false
},
"physics": {
"enabled": true,
"stabilization": {
"enabled": true,
"fit": true,
"iterations": 1000,
"onlyDynamicEdges": false,
"updateInterval": 50
}
}
};





network = new vis.Network(container, data, options);






return network;

}

drawGraph();

</script>
</body>
</html>
Loading