HTML::BarChart - Class that generates Bar Charts in HTML
use HTML::BarChart; my ($Width,$Height) = (300,100); $Chart = HTML::BarChart->new("HTML::BarChart Example", $Width, $Height); $Chart->bar("LABEL1",115,"#BBBBAA"); # Label, PlotValue, Color $Chart->bar("LABEL2",212,"#AAAA99"); $Chart->bar("LABEL3",89,"#999988"); $Chart->bar("LABEL4",256,"#888877");
$Chart->draw;
Generates Bar Charts with HTML Tables from input, All ratio calculation is done by the module. Its really a very simple package.
The following methods are available:
Creates new HTML::BarChart Object with specified $width and specified $height Places $title in the titlebar
Plots point on the BarChart, $value being relative to the largest value passed prior to calling $Chart->return and the $height passed in HTML::BarChart->new
Renders the HTML and gives it as return value, this is usefull for if you are actually using another module for output and wish to pass the char through as a paramater.
Simply calls print $Chart->return, printing the resulting chart to standard output.