Net-GraphSpace

 view release on metacpan or  search on metacpan

lib/Net/GraphSpace/Edge.pm  view on Meta::CPAN

package Net::GraphSpace::Edge;
use Moose;

with 'Net::GraphSpace::AttributesToJSON';

has id       => (is => 'ro', isa => 'Str', required => 1);
has source   => (is => 'ro', isa => 'Str', required => 1);
has target   => (is => 'ro', isa => 'Str', required => 1);
has label    => (is => 'rw', isa => 'Str');
has popup    => (is => 'rw', isa => 'Str');
has color    => (is => 'rw', isa => 'Str');
has width    => (is => 'rw', isa => 'Num');
has graph_id => (is => 'rw', isa => 'Str');
has labelFontWeight => (is => 'rw', isa => 'Str');


1;

__END__
=pod

lib/Net/GraphSpace/Edge.pm  view on Meta::CPAN


version 0.0009

=head1 SYNOPSIS

    my $node = Net::GraphSpace::Edge->new(
        id       => 'node1-node2', # Required
        source   => 'node1',       # Required
        target   => 'node2',       # Required
        label    => 'edge label',
        popup    => 'stuff that goes in the popup window',
        color    => '#FF0000',
        width    => 5.5,
        graph_id => 'graph22',
        labelFontWeight => 'bold',
    );

=head1 DESCRIPTION

Represents an edge in a GraphSpace graph.
Note that a source and target node are required, even if your edges are

lib/Net/GraphSpace/Edge.pm  view on Meta::CPAN

=back

Optional:

=over

=item label

The node label.

=item popup

Stuff that goes in the popup window.
Currently, this can contain some html.

=item color

The node color in hex format, e.g., '#F00'.

=item width

The width size as a floating point value.

lib/Net/GraphSpace/Node.pm  view on Meta::CPAN

package Net::GraphSpace::Node;
use Moose;

use Net::GraphSpace::Types;

with 'Net::GraphSpace::AttributesToJSON';

has id    => (is => 'ro', isa => 'Str', required => 1);
has label => (is => 'rw', isa => 'Str');
has popup => (is => 'rw', isa => 'Str');
has color => (is => 'rw', isa => 'Str');
has size  => (is => 'rw', isa => 'Str');
has shape => (is => 'rw', isa => 'Str');
has graph_id        => (is => 'rw', isa => 'Str');
has borderWidth     => (is => 'rw', isa => 'Num');
has labelFontWeight => (is => 'rw', isa => 'LabelFontWeight');


1;

lib/Net/GraphSpace/Node.pm  view on Meta::CPAN


=head1 VERSION

version 0.0009

=head1 SYNOPSIS

    my $node = Net::GraphSpace::Node->new(
        id    => 'node-a', # Required
        label => 'Node A',
        popup => 'stuff that goes in the popup window',
        color => '#FF0000',
        size  => 'auto',
        shape => 'RECTANGLE',
        graph_id        => 'graph22',
        borderWidth     => 2.5,
        labelFontWeight => 'bold',
    );

=head1 DESCRIPTION

lib/Net/GraphSpace/Node.pm  view on Meta::CPAN

=back

Optional:

=over

=item label

The node label.

=item popup

Stuff that goes in the popup window.
Currently, this can contain some html.

=item color

The node color in hex format. Examples: '#F00', '#F2F2F2'

=item size

The node size.
If set to 'auto', the node is automatically sized to fit the label.



( run in 3.275 seconds using v1.01-cache-2.11-cpan-364913b4093 )