.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Strip 3pm" .TH Strip 3pm "2023-01-22" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Chart::Strip \- Draw strip chart type graphs. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Chart::Strip; \& \& my $ch = Chart::Strip\->new( \& title => \*(AqHappiness of our Group\*(Aq, \& # other options ... \& ); \& \& $ch\->add_data( $davey_data, { style => \*(Aqline\*(Aq, \& color => \*(AqFF0000\*(Aq, \& label => \*(AqDavey\*(Aq } ); \& \& $ch\->add_data( $jenna_data, { style => \*(Aqline\*(Aq, \& color => \*(Aq00FF88\*(Aq, \& label => \*(AqJenna\*(Aq } ); \& \& print $ch\->png(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The Chart::Strip package plots data values versus time graphs, such as used for seismographs, EKGs, or network usage reports. .PP It can plot multiple data sets on one graph. It offers several styles of plots. It automatically determines the proper ranges and labels for both axii. .SH "USAGE" .IX Header "USAGE" .SS "Create the Chart" .IX Subsection "Create the Chart" .Vb 5 \& $chart = Chart::Strip\->new(); \& $chart = Chart::Strip\->new( \& option1 => value, \& option2 => value, \& ); .Ve .PP If no options are specified, sensible default values will be used. The following options are recognized: .ie n .IP """width""" 4 .el .IP "\f(CWwidth\fR" 4 .IX Item "width" The width of the image .ie n .IP """height""" 4 .el .IP "\f(CWheight\fR" 4 .IX Item "height" The height of the image. .ie n .IP """title""" 4 .el .IP "\f(CWtitle\fR" 4 .IX Item "title" The title of the graph. Will be placed centered at the top. .ie n .IP """x_label""" 4 .el .IP "\f(CWx_label\fR" 4 .IX Item "x_label" The label for the x axis. Will be placed centered at the bottom. .ie n .IP """y_label""" 4 .el .IP "\f(CWy_label\fR" 4 .IX Item "y_label" The label for the y axis. Will be placed vertically along the left side. .ie n .IP """draw_grid""" 4 .el .IP "\f(CWdraw_grid\fR" 4 .IX Item "draw_grid" Should a grid be drawn on the graph? .ie n .IP """draw_border""" 4 .el .IP "\f(CWdraw_border\fR" 4 .IX Item "draw_border" Should a border be drawn around the edge of the image? .ie n .IP """draw_tic_labels""" 4 .el .IP "\f(CWdraw_tic_labels\fR" 4 .IX Item "draw_tic_labels" Should value labels be shown? .ie n .IP """draw_data_labels""" 4 .el .IP "\f(CWdraw_data_labels\fR" 4 .IX Item "draw_data_labels" Should each data set be labeled? .ie n .IP """transparent""" 4 .el .IP "\f(CWtransparent\fR" 4 .IX Item "transparent" Should the background be transparent? .ie n .IP """grid_on_top""" 4 .el .IP "\f(CWgrid_on_top\fR" 4 .IX Item "grid_on_top" Should the grid be drawn over the data (1) or below the data (0)? .ie n .IP """binary""" 4 .el .IP "\f(CWbinary\fR" 4 .IX Item "binary" Use powers of 2 instead of powers of 10 for the y axis labels. .ie n .IP """data_label_style""" 4 .el .IP "\f(CWdata_label_style\fR" 4 .IX Item "data_label_style" Style for drawing the graph labels. \f(CW\*(C`text\*(C'\fR or \f(CW\*(C`box\*(C'\fR .ie n .IP """thickness""" 4 .el .IP "\f(CWthickness\fR" 4 .IX Item "thickness" Thickness of lines in pixels. (Requires \s-1GD\s0 newer than \f(CW$VERSION\fR). .ie n .IP """skip_undefined""" 4 .el .IP "\f(CWskip_undefined\fR" 4 .IX Item "skip_undefined" Don\e't draw a line into or out of a datapoint whose value is undefined. If false, undefined values are treated as though they were 0. .ie n .IP """boxwidth""" 4 .el .IP "\f(CWboxwidth\fR" 4 .IX Item "boxwidth" Width of boxes for box style graphs. The width may also be specified as \f(CW\*(C`width\*(C'\fR in the data options or per point. If no width is specified a reasonable default is used. .SS "Adding Data" .IX Subsection "Adding Data" .Vb 1 \& $chart\->add_data( $data, $options ); .Ve .PP The data should be an array ref of data points. Each data point should be a hash ref containing: .PP .Vb 5 \& { \& time => $time_t, # must be a unix time_t \& value => $value, # the data value \& color => $color, # optional, used for this one point \& } .Ve .PP or, range style graphs should contain: .PP .Vb 6 \& { \& time => $time_t, # must be a unix time_t \& min => $low, # the minimum data value \& max => $high, # the maximum data value \& color => $color, # optional, used for this one point \& } .Ve .PP and the options may contain: .PP .Vb 5 \& { \& style => \*(Aqline\*(Aq, # graph style: line, filled, range, points, box \& color => \*(AqFF00FF\*(Aq, # color used for the graph \& label => \*(AqNew England\*(Aq, # name of the data set \& } .Ve .PP points style graphs may specify the point diameter, as \f(CW\*(C`diam\*(C'\fR .PP box style graphs may specify the box width, as \f(CW\*(C`width\*(C'\fR .PP line and filled graphs may specify a \f(CW\*(C`smooth\*(C'\fR parameter, to connect points using smooth curves instead of straight lines. A value of \f(CW1\fR is recommended, larger values will be less smooth. .PP line, points, box, and filled graphs may specify a drop shadow, consisting of a hashref containing \f(CW\*(C`dx\*(C'\fR, \f(CW\*(C`dy\*(C'\fR, \f(CW\*(C`dw\*(C'\fR, and optionally, \f(CW\*(C`color\*(C'\fR .PP .Vb 1 \& shadow => { dx => 3, dy => 3, dw => 3, color => \*(AqCCCCCC\*(Aq } .Ve .SS "Outputing The Image" .IX Subsection "Outputing The Image" .ie n .IP "$chart\->\fBpng()\fR" 4 .el .IP "\f(CW$chart\fR\->\fBpng()\fR" 4 .IX Item "$chart->png()" Will return the \s-1PNG\s0 image .ie n .IP "$chart\->\fBjpeg()\fR" 4 .el .IP "\f(CW$chart\fR\->\fBjpeg()\fR" 4 .IX Item "$chart->jpeg()" Will return the jpeg image .ie n .IP "$chart\->\fBgd()\fR" 4 .el .IP "\f(CW$chart\fR\->\fBgd()\fR" 4 .IX Item "$chart->gd()" Will return the underlying \s-1GD\s0 object. .SH "EXAMPLE IMAGES" .IX Header "EXAMPLE IMAGES" .Vb 2 \& http://argus.tcp4me.com/shots.html \& http://search.cpan.org/src/JAW/Chart\-Strip\-1.07/eg/index.html .Ve .SH "LICENSE" .IX Header "LICENSE" This software may be copied and distributed under the terms found in the Perl \*(L"Artistic License\*(R". .PP A copy of the \*(L"Artistic License\*(R" may be found in the standard Perl distribution. .SH "BUGS" .IX Header "BUGS" There are no known bugs in the module. .SH "SEE ALSO" .IX Header "SEE ALSO" .Vb 1 \& Yellowstone National Park. .Ve .SH "AUTHOR" .IX Header "AUTHOR" .Vb 1 \& Jeff Weisberg \- http://www.tcp4me.com .Ve