Google-Chart

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

  * Attempt to fix tests by using Test::UseAllModules (rt #38233)

0.05000 - 29 Jul 2008
  * Release new version. Please be careful as there are MANY backwards
    incompatible changes
  * Tweak Makefile.PL so it warns if you already have an old version
    installed.

0.05000_03 - 29 Jul 2008
  * Make Data::Extended capable of handling multiple sets of data (danjou)
  * Add proper color support and legend support (danjou)

0.05000_02 - 25 Jul 2008
  * Fix Fill::LinearStripes and Fill::LinearGradient
  * Slight modification Google::Chart accessor generation

0.05000_01 - 24 Jul 2008
  * Mooooooooooooooose
  * Backwards incompatible! Beware!

Previous versions

MANIFEST  view on Meta::CPAN

lib/Google/Chart/Types.pm
Makefile.PL
MANIFEST			This list of files
META.yml
t/00_compile.t
t/01_size.t
t/02_marker.t
t/10_text.t
t/11_extended.t
t/20_color.t
t/21_legend.t
t/22_grid.t
t/50_line.t
t/51_bar.t
t/52_pie.t
t/53_qrcode.t
t/60_axis.t
t/61_fill.t
t/90_env_proxy.t
t/99-pod-coverage.t
t/99-pod.t

lib/Google/Chart.pm  view on Meta::CPAN

    data => {
        is       => 'rw',
        does     => 'Google::Chart::Data',
        coerce   => 1,
    },
    color => {
        is       => 'rw',
        isa      => 'Google::Chart::Color',
        coerce   => 1,
    },
    legend => {
        is       => 'rw',
        does     => 'Google::Chart::Legend',
        coerce   => 1,
    },
    grid => {
        is       => 'rw',
        isa     => 'Google::Chart::Grid',
        coerce   => 1,
    },
    size => {

lib/Google/Chart.pm  view on Meta::CPAN

  );

=item marker

Specifies the markers that go on line charts.

=item axis

Specifies the axis labels and such that go on line and bar charts

=item legend

=item color

=item fill

=item

=back

=head2 as_uri()

lib/Google/Chart/Margin.pm  view on Meta::CPAN

coerce 'Google::Chart::Margin'
    => from 'ArrayRef'
    => via {
        my $aref = $_;

        return Google::Chart::Margin->new(
            left     => $aref->[0],
            right    => $aref->[1],
            top      => $aref->[2],
            bottom   => $aref->[3],
            legend_x => $aref->[4],
            legend_y => $aref->[5],
        );
    }
;

has 'left' => (
    is => 'rw',
    isa => 'Int',
    required => 1
);

lib/Google/Chart/Margin.pm  view on Meta::CPAN

    isa => 'Int',
   required => 1
);

has 'bottom' => (
    is => 'rw',
    isa => 'Int',
    required => 1
);

has 'legend_x' => (
    is => 'rw',
    #isa => 'Int',
    required => 0
);

has 'legend_y' => (
    is => 'rw',
    #isa => 'Int',
    required => 0
);

__PACKAGE__->meta->make_immutable;

no Moose;
no Moose::Util::TypeConstraints;

sub parameter_value {
    my $self = shift;

    my $str = 
    join(',', $self->left, $self->right, $self->top, $self->bottom );

    if($self->legend_x) {
        $str .= "|" . $self->legend_x . "," . $self->legend_y;
    }

    return $str;
}

1;

__END__

=head1 NAME

t/21_legend.t  view on Meta::CPAN

            {
                location => 'x',
                labels => [1, 2, 3],
            },
            {
                location => 'y',
                labels => [0,25,50,75,100],
            },
        ],
        color => ['ff0000', '00ffff'],
        legend => 'data1',
    );
    ok($graph);
    isa_ok($graph, 'Google::Chart');
    my $uri = $graph->as_uri;
    note ($uri);
    my %h = $uri->query_form;
    is( $h{chdl}, 'data1' );
}

{

t/21_legend.t  view on Meta::CPAN

            {
                location => 'x',
                labels => [1, 2, 3],
            },
            {
                location => 'y',
                labels => [0,25,50,75,100],
            },
        ],
        color => ['ff0000', '00ffff'],
        legend => ['data1', 'data2'],
    );
    ok($graph);
    isa_ok($graph, 'Google::Chart');
    my $uri = $graph->as_uri;
    note ($uri);
    my %h = $uri->query_form;
    is( $h{chdl}, 'data1|data2' );
}

t/22_grid.t  view on Meta::CPAN

            {
                location => 'y',
                labels => [-100,0,100,200],
            },
        ],
        grid => {
            x_step_size => 50,
            y_step_size => 33.3,
        },
        color => ['ff0000', '00ffff'],
        legend => ['data1', 'data2'],
    );
    ok($graph);
    isa_ok($graph, 'Google::Chart');
    my $uri = $graph->as_uri;
    note ($uri);
    my %h = $uri->query_form;
    is( $h{chg}, '50,33.3,1,1' );
}



( run in 1.000 second using v1.01-cache-2.11-cpan-49f99fa48dc )