Skip Menu |

This queue is for tickets about the GraphViz CPAN distribution.

Report information
The Basics
Id: 63340
Status: resolved
Priority: 0/
Queue: GraphViz

People
Owner: Nobody in particular
Requestors: cpan.org [...] mavit.org.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 2.04
Fixed in: (no value)



Subject: Allow full range of values for rankdir
The attached patch against GraphViz 2.04 permits right-to-left and bottom-to-top graph layouts.
Subject: graphviz-rankdir.patch
--- lib/GraphViz.pm~ 2010-11-25 16:58:17.000000000 +0000 +++ lib/GraphViz.pm 2010-11-25 18:05:16.000000000 +0000 @@ -169,8 +169,10 @@ =item rankdir Another attribute 'rankdir' controls the direction the nodes are linked -together. If true it will do left->right linking rather than the -default up-down linking. +together. Possible values are "TB", "LR", "BT", "RL", corresponding to +directed graphs drawn from top to bottom, from left to right, from +bottom to top, and from right to left, respectively. The default is left +to right. =item width, height @@ -1092,7 +1094,12 @@ $dot .= $graph_type . " " . $self->{NAME} . " {\n"; # the direction of the graph - $dot .= "\trankdir=LR;\n" if $self->{RANK_DIR}; + if ( $self->{RANK_DIR} =~ m/^(?:LR|RL|TB|BT)$/ ) { + $dot .= "\trankdir=" . $self->{RANK_DIR} . ";\n"; + } + elsif ( $self->{RANK_DIR} ) { + $dot .= "\trankdir=LR;\n"; + } # the size of the graph $dot .= "\tsize=\"" . $self->{WIDTH} . "," . $self->{HEIGHT} . "\";\n"
This issue is fixed in GraphViz2 V 1.00. There're won't be any further development on GraphViz.