Comments (1)
You should be able to get node attributes using the DOM after inserting the generated SVG into the document. To make this more convenient, add "id" attributes to the nodes you create.
Given this graph:
digraph g {
a -> b;
a[id="a"];
}
After inserting the SVG into the document, you can say something like this to return the stroke color for the ellipse shape in the node "a":
document.querySelector("#a ellipse").getAttribute("stroke")
from viz-js.
Related Issues (20)
- full.render.js is broken on Realese 2.1.1 HOT 4
- Sorry, it's another rollup / typescript question HOT 16
- Name "cluster" is not allowed when format = JSON HOT 1
- node proces crash after single viz instance renderString more then 1714 times HOT 1
- Can't build w/ emscripten 1.38.25 (latest) HOT 2
- Is synchronous use still possible? HOT 1
- Update viz-js.com to use new version
- Add type definitions HOT 4
- Publish lang-dot package
- Figure out why pkg-config doesn't work as expected for Expat
- Investigate distributing a non-WASM build
- Investigate support for separate WebAssembly instantiation
- Support -x (reduce) option
- Image support in v3 HOT 3
- RuntimeError with long label starting with newline HOT 1
- Android Project HOT 1
- Types can not be imported with current package.json HOT 2
- Dynamic font Family HOT 1
- Strict mode but merge labels HOT 1
- Text not rendering in nodes HOT 11
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 viz-js.