G. Wade Johnson > SVG-Sparkline-0.36 > SVG::Sparkline

Download:
SVG-Sparkline-0.36.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.36   Source   Latest Release: SVG-Sparkline-1

NAME ^

SVG::Sparkline - Create Sparklines in SVG

VERSION ^

This document describes SVG::Sparkline version 0.36

SYNOPSIS ^

    use SVG::Sparkline;

    my $sl1 = SVG::Sparkline->new( Whisker => { values=>\@values, color=>'#eee', height=>12 } );
    print $sl1->to_string();

    my $sl2 = SVG::Sparkline->new( Line => { values=>\@values, color=>'blue', height=>12 } );
    print $sl2->to_string();

    my $sl3 = SVG::Sparkline->new( Area => { values=>\@values, color=>'green', height=>10 } );
    print $sl3->to_string();

    my $sl4 = SVG::Sparkline->new( Bar => { values=>\@values, color=>'#66f', height=>10 } );
    print $sl4->to_string();
  
    my $sl5 = SVG::Sparkline->new( RangeBar => { values=>\@value_pairs, color=>'#66f', height=>10 } );
    print $sl5->to_string();

DESCRIPTION ^

In the book Beautiful Evidence, Edward Tufte describes sparklines as small, high-resolution, graphics embedded in a context of words, numbers, images.

This module provides a relatively easy interface for creating different kinds of sparklines. This class is not intended to be used to build large, complex graphs (there are other modules much more suited to that job). The focus here is on the kinds of data well-suited to the sparklines concept.

See SVG::Sparkline::Manual for the full usage documentation for the module.

INTERFACE ^

SVG::Sparkline->new( $type, $args_hr )

Create a new SVG::Sparkline object of the specified type, using the parameters in the $args_hr hash reference.

See SVG::Sparkline::Manual for the details.

get_height

Returns in height in pixels of the completed sparkline.

get_width

Returns in width in pixels of the completed sparkline.

to_string

Convert the SVG::Sparkline object to an XML string. This is the method that is used by the stringification overload.

DIAGNOSTICS ^

Diagnostic message for the various types are documented in the appropriate SVG::Sparkline::* module.

CONFIGURATION AND ENVIRONMENT ^

SVG::Sparkline requires no configuration files or environment variables.

DEPENDENCIES ^

Carp, SVG.

INCOMPATIBILITIES ^

None reported.

BUGS AND LIMITATIONS ^

No bugs have been reported.

Please report any bugs or feature requests to bug-svg-sparkline@rt.cpan.org, or through the web interface at http://rt.cpan.org.

ACKNOWLEDGEMENTS ^

This module has been greatly improved by suggestions and corrections supplied but Robert Boone, Debbie Campbell, and Joshua Keroes.

AUTHOR ^

G. Wade Johnson <wade@anomaly.org>

LICENCE AND COPYRIGHT ^

Copyright (c) 2012, G. Wade Johnson <wade@anomaly.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl 5.8.0. See perlartistic.

DISCLAIMER OF WARRANTY ^

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

syntax highlighting: