100 |
isa => 'Bool', |
isa => 'Bool', |
101 |
); |
); |
102 |
|
|
103 |
|
has clusters => ( |
104 |
|
documentation => 'cluster by classes', |
105 |
|
is => 'rw', |
106 |
|
isa => 'Bool', |
107 |
|
); |
108 |
|
|
109 |
sub introspect_path { 'var/introspect/' }; |
sub introspect_path { 'var/introspect/' }; |
110 |
|
|
111 |
sub as_markup { |
sub as_markup { |
219 |
my $pcnt = $v / $max_count; |
my $pcnt = $v / $max_count; |
220 |
my $color = join(",", ( $pcnt, $pcnt, 0.75 ) ); |
my $color = join(",", ( $pcnt, $pcnt, 0.75 ) ); |
221 |
|
|
222 |
|
my @cluster; |
223 |
|
if ( $self->clusters ) { |
224 |
|
my $name = $1 if $node =~ m{^([^:]+)}; |
225 |
|
@cluster = ( 'cluster' => { |
226 |
|
name => $name, |
227 |
|
style => 'filled', |
228 |
|
bgcolor => 'lightgrey', |
229 |
|
color => 'lightgrey', |
230 |
|
}); |
231 |
|
} |
232 |
|
|
233 |
$g->add_node( $node, |
$g->add_node( $node, |
234 |
style =>'filled', |
style =>'filled', |
235 |
color => $color, |
color => $color, |
236 |
fillcolor => $color, |
fillcolor => $color, |
237 |
# label => "$node\n$v", |
# label => "$node\n$v", |
238 |
|
@cluster, |
239 |
); |
); |
240 |
|
|
241 |
} |
} |