C:\Perl_PPM\Imager-Graph-0.10\blib/lib/Imager/Graph/Vertical.pm |
Imager::Graph::Vertical- A super class for line/bar/column/area charts
use Imager::Graph::Vertical;
my $vert = Imager::Graph::Vertical->new; $vert->add_column_data_series(\@data, "My data"); $vert->add_area_data_series(\@data2, "Area data"); $vert->add_stacked_column_data_series(\@data3, "stacked data"); $vert->add_line_data_series(\@data4, "line data"); my $img = $vert->draw();
use Imager::Graph::Column; my $column = Imager::Graph::Column->new; $column->add_data_series(\@data, "my data"); my $img = $column->draw();
This is a base class that implements the functionality for column, stacked column, line and area charts where the dependent variable is represented in changes in the vertical position.
The subclasses, the Imager::Graph::Column manpage, the Imager::Graph::StackedColumn manpage, the Imager::Graph::Line manpage and the Imager::Graph::Area manpage simply provide default data series types.
set_y_max($value)
set_y_min($value)
set_column_padding($int)
set_range_padding($percentage)
Defaults to 10. This attribute is ignored for positive numbers if
set_y_max()
has been called, and ignored for negative numbers if
set_y_min()
has been called.
set_negative_background($color)
draw()
show_horizontal_gridlines()
Enables the horizontal_gridlines
feature, which shows horizontal
gridlines at the y-tics.
The style of the gridlines can be controlled with the
set_horizontal_gridline_style()
method (or by setting the hgrid
style).
Set the style and color of horizonal gridlines.
show_graph_outline($flag)
If no flag is supplied, unconditionally enable the graph outline.
If $flag is supplied, enable/disable the graph_outline feature based on that.
Enabled by default.
Sets the style of the graph outline.
Default: the style fg
.
Set the fill used to fill the graph data area.
Default: the style bg
.
eg.
$graph->set_graph_fill_style(solid => "FF000020", combine => "normal");
show_area_markers()
show_area_markers($value)
If $value is missing or true, draw markers along the top of area data series.
eg.
$chart->show_area_markers();
show_line_markers()
show_line_markers($value)
If $value is missing or true, draw markers on a line data series.
Note: line markers are drawn by default.
use_automatic_axis()
set_y_tics($count)
C:\Perl_PPM\Imager-Graph-0.10\blib/lib/Imager/Graph/Vertical.pm |