php - graphviz svg autoresize -
i've got graph made graphviz circo (or dot, guess in issue there's no difference) in svg format , i'd image resized automaticly. know can done if set
<svg width="100%" height="100%"...
but can't realize how make circo this.
the graph file circo generated in php this:
$graph = "digraph structs { node [shape=record, url=\"http://localhost/gr.php?object=\n\"]; overlap = prism; size=\"50,50\";`
i've tried size=\"100%,100%\";
circo translates <svg width="3600pt" height="2946pt"
. so, how can make circo put 100%
in there? thanks!
the thing worked me is
$svg = file('circo.svg'); $svg[6] = preg_replace("/\d+pt/","100%",$svg[6]); //the line number fixed foreach($svg $line) { echo "$line"; }
maybe =)
Comments
Post a Comment