-
Notifications
You must be signed in to change notification settings - Fork 333
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
Donut charts in Graphviz #44
Comments
Does d3 imply it only renders in a browser? Can this donut thing work purely in mpl and graphviz? |
| Does d3 imply it only renders in a browser?
Yes. The specific example I give in the code pen only renders in a browser.
| Can this donut thing work purely in mpl
Yes. Setting Graphviz aside, mpl can do donuts:
https://matplotlib.org/3.1.0/gallery/pie_and_polar_charts/pie_and_donut_labels.html
Disclaimer: I have not used mpl for years.
| and graphviz?
Yes. The technique that I demonstrate in that browser-specific code pen—that is, using the image attribute to overlay a background-color-filled circle on the pie—should also work in the "original" Graphviz tool (as opposed to the Emscripten'd-to-JavaScript Viz.js used by d3-graphviz). The difference is that, where my example code uses a data URL to supply the SVG of the background-color-filled circle, for the original Graphviz tool I anticipate that you will supply a file path to a similar SVG file. Disclaimer: I haven't tried that. In recent times, my primary interest in Graphviz has shifted to visualizations in interactive web apps, rather than, say, PDFs.
|
Hmm...well,I don't hate the pie charts enough to really worry about this, particularly if it requires that I do some thinking or has anything requiring a browser. ;) if it's okay with you I'm going to close this for now |
No worries, entirely your call. No browser required, but, yes, some thinking 😉. I chose donuts for two reasons:
My viz is rendered entirely in Graphviz. I investigated using a different library to render each node in the chart, as you've done, but I hit a roadblock: I couldn't capture mouse events for objects in such nodes. I think that's because Graphviz renders them using the SVG Here's an example of what I'm doing: Essentially, I'm overlaying computer transaction performance data on transaction call structures. Each node (donut) represents a computer transaction. Each edge (arrow) represents a transaction calling another transaction. The size of each node represents the transaction CPU time relative to other transactions: so, the donuts are also "bubbles". I've deliberately omitted the legend because this viz is currently an inhouse project; I don't want to publicize the domain-specific details. |
very impressive! |
Hi @parrt,
Following your suggestion via email (20 July 2019):
here's an extract from my email to you:
The text was updated successfully, but these errors were encountered: