Opened 18 years ago
Last modified 7 years ago
#1478 new enhancement
Scale graphviz output proportional to page width
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Component: | GraphvizPlugin |
Severity: | normal | Keywords: | graphviz image scale |
Cc: | Trac Release: | 0.12 |
Description
Before installing the graphviz plugin, we commonly screen captured graphviz output and put it into trac pages as an image-macro scaled to a percentage of the page width e.g., [[Image(Graph.png,40%)]]
It would be really cool to be able to do this type of scaling with the graphviz plugin output, especially for large graphs that are too big for most monitors.
Attachments (2)
Change History (10)
Changed 17 years ago by
Attachment: | thumbail.patch added |
---|
comment:1 Changed 17 years ago by
comment:2 Changed 16 years ago by
Owner: | changed from Peter Kropf to Christian Boos |
---|---|
Trac Release: | 0.10 → 0.11 |
Would be interesting to be able to simply specify the scaling in the generated <img>.
comment:3 Changed 16 years ago by
Ideally one should be able to specify extra arguments to the WikiProcessors, as one can do with the builtin div
processor in 0.11. So this would become:
{{{ #!graphviz width="80%" digraph G { ... } }}}
This will eventually become possible in some future iteration of Trac. For now, we have no choice but to put this information into the "content".
To clearly differentiate this extra information from the graphviz data, we can specify this information in a pseudo <img> tag, on the first line:
{{{ #!graphviz <img width="80%" /> digraph G { ... } }}}
Notes:
- scaling of otherwise good looking .png graphs looks ugly in IExplorer7 and Opera9.60. Nice results with Firefox and Chrome.
- being able to specify the size for the SVG output is also an improvement from the previous situation, where the size was "auto-corrected" by the GraphvizPlugin. This auto-correction didn't work well for me, so you may want to always add <img width="100%" /> when using the graphviz/svg processor
Changed 16 years ago by
Attachment: | graphviz-img-spec-r4543.diff added |
---|
Add support for specifying the attributes of the <img> tag corresponding to the generated picture of the graph
comment:4 follow-up: 5 Changed 16 years ago by
Trac Release: | 0.11 → 0.12 |
---|
Well, I think I'll rather wait for the #!graphviz width="80%"
syntax to be implemented in 0.12, otherwise I'll end up having to support both ways in the plugin.
comment:5 Changed 12 years ago by
Replying to cboos:
Well, I think I'll rather wait for the
#!graphviz width="80%"
syntax to be implemented in 0.12, otherwise I'll end up having to support both ways in the plugin.
Are there any updates on this? I'm on tract 0.12.2 and neither syntax appears to be working?
Thx, Alex
comment:6 Changed 12 years ago by
+1 - I too would like this functionality.
Being able to specify size of the output image in any manner would be appreciated.
comment:7 Changed 7 years ago by
Did this ever make it into Trac 1.0? I thought I remembered doing it in older versions of graphviz/trac but in my current 1.0 installs I can't make any of the above scaling commands work.
comment:8 Changed 7 years ago by
It strikes me that since the MacroChainMacro works with the GraphViz plugin, you might be able to use the former to pipe the latter's output into the image macro, and get your scaling from there.
I propose a thumbail.patch that work with PIL python library (must install it)
To activate thumbail you have to set max_width_screen_size in px: