Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Relations::Display 0.92

    Download button

    No screenshots available
    Downloads: 285  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    GAF-3 Industries, Inc. | More programs
    Perl Artistic License / FREE
    June 13th, 2007, 00:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Relations::Display description

    Relations::Display is a DBI/DBD::mysql Query Graphing Perl module.

    Relations::Display is a DBI/DBD::mysql Query Graphing Perl module.

    SYNOPSIS

    # DBI, Relations::Display Script that creates a
    # matrix, table, and graph from a query.

    use DBI;
    use Relations;
    use Relations::Query;
    use Relations::Abstract;
    use Relations::Display;

    $dsn = "DBI:mysql:watcher";

    $username = "root";
    $password = '';

    $dbh = DBI->connect($dsn,$username,$password,{PrintError => 1, RaiseError => 0});

    $abstract = new Relations::Abstract($dbh);

    $display = new Relations::Display(-abstract => $abstract,
    -query => {-select => {total => "count(*)",
    first => "'Bird'",
    second => "'Count'",
    third => "if(gender='Male','Boy','Girl')",
    tao => "if(gender='Male','Yang','Yin')",
    sex => "gender",
    kind => "sp_name",
    id => "species.sp_id",
    fourth => "(species.sp_id+50)",
    vert => "2",
    horiz => "1.5"},
    -from => ['bird','species'],
    -where => ['species.sp_id=bird.sp_id',
    'species.sp_id < 4'],
    -group_by => ['sp_name','gender','first','second'],
    -order_by => ['gender','sp_name']},
    -x_axis => 'first,kind,id,fourth',
    -legend => 'second,third,tao,sex,vert,horiz',
    -y_axis => 'total',
    -hide => 'fourth,third,vert,horiz',
    -vertical => 'vert',
    -horizontal => 'horiz');

    $matrix = $display->get_matrix();

    $table = $display->get_table();

    $display->set(-chart => 'bars',
    -width => 400,
    -height => 400,
    -settings => {y_min_value => 0,
    y_max_value => 3,
    y_tick_number => 3,
    transparent => 0}
    );

    $gph = $display->get_graph();

    $gd = $gph->gd();

    open(IMG, '>test.png') or die $!;
    binmode IMG;
    print IMG $gd->png;

    $dbh->disconnect();

    Requirements:

    · perl 5.004
    · DBI >= 1.13
    · DBD::mysql >= 1.18
    · Relations >= 0.95
    · Relations::Query >= 0.93
    · Relations::Abstract >= 0.94

    What's New in This Release:

    · Fixed a problem with x axis and legend field values. Any field names that contained spaces would have their values show up as blank in the Graph and Table. That's fixed now.



    Product's homepage

      


    TAGS:

    DBD::mysql | DBI::mysql | Query Graphing | Relations::Display | DBI::mysql | DBD::mysql

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM