Hi!
Thanks for your module. Unfortunately it generates invalid ids for
elements. If you look at the source of the attached svg, you'll see
several '<g id="#"...' where # is a single digit. This is not allowed
(see
http://www.w3.org/TR/2006/REC-xml11-20060816/#sec-attribute-types ).
These invalid ids lead to problems when I want to reuse the SVG.
Attached is a small script that generates the given SVG.
Cheers,
Renée
#!/usr/bin/perl
use strict;
use warnings;
use Graph::Easy;
my %dialog = (
start => [ qw/software schulung/ ],
software => [qw/referenzen kompetenz/],
referenzen => [qw/start/],
);
my $graph = Graph::Easy->new;
for my $page ( keys %dialog ) {
for my $next ( @{ $dialog{$page} } ) {
$graph->add_edge( $page, $next );
}
}
if ( open my $out, '>', 'easy.svg' ) {
print $out $graph->as_svg({
standalone => 1,
});
}