Comments (4)
This is already possible by using Network.set_template
and setting it to a custom template. write_html
will then load the template from this path
. The easy fix to make this more accessible would be to add path
as an optional value to the constructor of Network
I guess?
In this case write_html
, has to take an additional (optional) **kwargs
argument which then gets merged with the Jinja2 context that is already there. Otherwise, no new placeholders can be added to the custom template.
from pyvis.
This is already possible by using
Network.set_template
and setting it to a custom template.write_html
will then load the template from thispath
.
Yep! I tested by doing this
pyvis_graph = Network(height="100%", width="100%")
pyvis_graph.set_template('template.html.j2')
# Do some stuff ....
pyvis_graph.write_html('test_template.html')
webbrowser.open('test_template.html')
from pyvis.
Hi! Yes, that is something I would want to implement going forward. Users should be able to specify path for their own templates.
If you want this feature with current Pyvis, you could try replacing the templates/template.html in your site-packages pyvis installation, since by default it looks for the template there.
from pyvis.
Also another thing that I noticed is that set_template
does not set the template
(jinja2.Template) but the path
to the template
from pyvis.
Related Issues (20)
- Adding and editing nodes and edges graphically HOT 1
- remove print statement
- Intergration with EasyGraph
- Some buttons not working
- Some buttons not working
- Dropdown list button is not precise
- Clustering nodes with same labels?
- Filtering Nodes HOT 1
- Arrows are not displayed on the graph HOT 1
- highlightActive is not defined: Causes wierd jump of graph
- AttributeError: 'NoneType' object has no attribute 'render' HOT 4
- How do you change the fonts of the labels on the nodes?
- Be able to set the color of an edge independently of the source node
- Left to Right Orientation?
- Interactive Node in in Output HOT 1
- Use palette to color nodes and add colorbar
- Edge titles does not work? HOT 6
- Pyvis HTML Output does not use 100% of the page HOT 2
- Save as json
- Problem with labels, trying integration with pandas, Latex and Networkx
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvis.