DBD::Chart - DBI driver abstraction for DBD::Chart::Plot and GD::Graph


NAME

DBD::Chart - DBI driver abstraction for DBD::Chart::Plot and GD::Graph


SYNOPSIS

        $dbh = DBI->connect('dbi:Chart')
            or die "Cannot connect: " . $DBI::errstr;
        #
        #       create file if it deosn't exist, otherwise, just open
        #
        $dbh->do('CREATE TABLE mychart (name CHAR(10), ID INTEGER, value FLOAT)')
                or die $dbh->errstr;
        #       add data to be plotted
        $sth = $dbh->prepare('INSERT INTO mychart VALUES (?, ?, ?)');
        $sth->bind_param(1, 'Values');
        $sth->bind_param(2, 45);
        $sth->bind_param(2, 12345.23);
        $sth->execute or die 'Cannot execute: ' . $sth->errstr;
        #       and render it
        $sth = $dbh->prepare('SELECT BARCHART FROM mychart');
        $sth->execute or die 'Cannot execute: ' . $sth->errstr;
        @row = $sth->fetchrow_array;
        print $row[0];
        # delete the chart
        $sth = $dbh->prepare('DROP TABLE mychart')
                or die "Cannot prepare: " . $dbh->errstr;
        $sth->execute or die 'Cannot execute: ' . $sth->errstr;
        $dbh->disconnect;


WARNING

THIS IS BETA SOFTWARE.


DESCRIPTION

The DBD::Chart provides a DBI abstraction for rendering pie charts, bar charts, box&whisker charts (aka boxcharts), histograms, Gantt charts, and line, point, and area graphs.

For detailed usage information, see the included dbdchart.html webpage. See DBI(3) for details on DBI. See GD(3), the GD::Graph(3) manpage for details about the graphing engines.

Prerequisites

Perl 5.6.0 minimum
DBI 1.14 minimum
DBD::Chart::Plot 0.61 (included with this package)
GD X.XX minimum
GD::Text X.XX minimum
libpng
zlib
libgd
jpeg-6b

Installation

For Windows users, use WinZip or similar to unpack the file, then copy Chart.pm to wherever your site-specific modules are kept (usually \Perl\site\lib\DBD for ActiveState Perl installations). Also create a 'Chart' directory in the DBD directory, and copy the Plot.pm module to the new directory. Note that you won't be able to execute the install test with this, but you need a copy of 'nmake' and all its libraries to run that anyway. I may whip up a PPM in the future.

For Unix, extract it with

    gzip -cd DBD-Chart-0.61.tar.gz | tar xf -

and then enter the following:

    cd DBD-Chart-0.61
    perl Makefile.PL
    make

Sorry, no tests are available yet. After you install, you can run the scripts in the 'examples' subdirectory and examine the resulting images.

    make install

Note that you probably need root or administrator permissions. If you don't have them, read the ExtUtils::MakeMaker man page for details on installing in your own directories. the ExtUtils::MakeMaker manpage.


FOR MORE INFO

Check out http://www.presicient.com/dbdchart with your favorite browser. It includes all the usage information.


AUTHOR AND COPYRIGHT

This module is Copyright (C) 2001, 2002 by Presicient Corporation

    Email: darnold@presicient.com

You may distribute this module under the terms of the Artistic License, as specified in the Perl README file.


SEE ALSO

DBI(3)

For help on the use of DBD::Chart, see the DBI users mailing list:

  dbi-users-subscribe@perl.org

For general information on DBI see

  http://www.symbolstone.org/technology/perl/DBI

 DBD::Chart - DBI driver abstraction for DBD::Chart::Plot and GD::Graph