-
Notifications
You must be signed in to change notification settings - Fork 353
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
Render output in Graph object #279
Comments
This isn't currently a way to do this. As you allude to, it might be possible to fake it by converting the JSON output to a graph object. At some point, I'd like Viz.js to provide a way to manipulate graphs as can be done when using Graphviz as a library. Being able to ask Viz.js for output as a graph object seems useful, so I'll also consider that for a future version.
I suppose that's a bit confusing. viz-js/packages/viz/src/viz.mjs Lines 58 to 61 in 3e6692b
|
By the way, what sort of transformation would you like to do on the edges of the graph before drawing? |
I am gradually building a version of Graphviz only for "cloud architecture diagram" as a hubby. Recently, I moved to your library since I wanted it to be mostly client side (browser) visualization.
Some of these sugar-coats are easier (and more accurate) to apply to Dot notation and some to "Graph/JSON" notation. I do tons of cloud diagrams and hate using lucid, etc. or even memaidJS. So, a week ago, I decided to build a tool using graphviz + a bunch of sugar-costing transformations, as I need them when doing my day job. There might be others seeking similar tool based on GraphViz. |
Render methods accept Dot syntax or Graph object instance.
Render methods output in many different formats (dot, SVG, Jason, etc).
Would you have an output format option in "Graph" format (
renderGraph
method) ? Or a convert method fromrenderJSON
toGraph
format.Use case: I'd like to do some transformation of edges before drawing. The convenient way is:
Interestingly,
renderJSON
is not the same asGraph
format!If there is a way to do so, without a new feature, please let me know.
The text was updated successfully, but these errors were encountered: