Server IP : 103.119.228.120 / Your IP : 3.146.206.246 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/share/man/man3/ |
Upload File : |
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" 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 turned on, 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 "SVG::TT::Graph::XY 3" .TH SVG::TT::Graph::XY 3 "2014-09-23" "perl v5.16.3" "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" SVG::TT::Graph::XY \- Create presentation quality SVG line graphs of XY data points easily .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use SVG::TT::Graph::XY; \& \& my @data_cpu = (0.3, 23, 0.5, 54, 1.0, 67, 1.8, 12); \& my @data_disk = (0.45, 12, 0.51, 26, 0.53, 23); \& \& my $graph = SVG::TT::Graph::XY\->new({ \& \*(Aqheight\*(Aq => \*(Aq500\*(Aq, \& \*(Aqwidth\*(Aq => \*(Aq300\*(Aq, \& }); \& \& $graph\->add_data({ \& \*(Aqdata\*(Aq => \e@data_cpu, \& \*(Aqtitle\*(Aq => \*(AqCPU\*(Aq, \& }); \& \& $graph\->add_data({ \& \*(Aqdata\*(Aq => \e@data_disk, \& \*(Aqtitle\*(Aq => \*(AqDisk\*(Aq, \& }); \& \& print "Content\-type: image/svg+xml\en\en"; \& print $graph\->burn(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This object aims to allow you to easily create high quality \&\s-1SVG\s0 line graphs of \s-1XY\s0 data. You can either use the default style sheet or supply your own. Either way there are many options which can be configured to give you control over how the graph is generated \- with or without a key, data elements at each point, title, subtitle etc. .SH "METHODS" .IX Header "METHODS" .SS "\fInew()\fP" .IX Subsection "new()" .Vb 1 \& use SVG::TT::Graph::XY; \& \& my $graph = SVG::TT::Graph::XY\->new({ \& \& # Optional \- defaults shown \& \*(Aqheight\*(Aq => 500, \& \*(Aqwidth\*(Aq => 300, \& \& \*(Aqshow_y_labels\*(Aq => 1, \& \*(Aqyscale_divisions\*(Aq => \*(Aq\*(Aq, \& \*(Aqmin_yscale_value\*(Aq => 0, \& \*(Aqmax_yscale_value\*(Aq => \*(Aq\*(Aq, \& \& \*(Aqshow_x_labels\*(Aq => 1, \& \*(Aqxscale_divisions\*(Aq => \*(Aq\*(Aq, \& \*(Aqmin_xscale_value\*(Aq => \*(Aq\*(Aq, \& \*(Aqmax_xscale_value\*(Aq => \*(Aq\*(Aq, \& \*(Aqstagger_x_labels\*(Aq => 0, \& \*(Aqrotate_x_labels\*(Aq => 0, \& \*(Aqy_label_formatter\*(Aq => sub { return @_ }, \& \*(Aqx_label_formatter\*(Aq => sub { return @_ }, \& \& \*(Aqshow_data_points\*(Aq => 1, \& \*(Aqshow_data_values\*(Aq => 1, \& \*(Aqrollover_values\*(Aq => 0, \& \& \*(Aqarea_fill\*(Aq => 0, \& \& \*(Aqshow_x_title\*(Aq => 0, \& \*(Aqx_title\*(Aq => \*(AqX Field names\*(Aq, \& \& \*(Aqshow_y_title\*(Aq => 0, \& \*(Aqy_title\*(Aq => \*(AqY Scale\*(Aq, \& \& \*(Aqshow_graph_title\*(Aq => 0, \& \*(Aqgraph_title\*(Aq => \*(AqGraph Title\*(Aq, \& \*(Aqshow_graph_subtitle\*(Aq => 0, \& \*(Aqgraph_subtitle\*(Aq => \*(AqGraph Sub Title\*(Aq, \& \*(Aqkey\*(Aq => 0, \& \*(Aqkey_position\*(Aq => \*(Aqright\*(Aq, \& \& # Stylesheet defaults \& \*(Aqstyle_sheet\*(Aq => \*(Aq/includes/graph.css\*(Aq, # internal stylesheet \& \*(Aqrandom_colors\*(Aq => 0, \& }); .Ve .PP The constructor takes a hash reference with values defaulted to those shown above \- with the exception of style_sheet which defaults to using the internal style sheet. .SS "\fIadd_data()\fP" .IX Subsection "add_data()" .Vb 5 \& my @data_cpu = (0.3, 23, 0.5, 54, 1.0, 67, 1.8, 12); \& or \& my @data_cpu = ([0.3,23], [0.5,54], [1.0,67], [1.8,12]); \& or \& my @data_cpu = ([0.3,23,\*(Aq23%\*(Aq], [0.5,54,\*(Aq54%\*(Aq], [1.0,67,\*(Aq67%\*(Aq], [1.8,12,\*(Aq12%\*(Aq]); \& \& $graph\->add_data({ \& \*(Aqdata\*(Aq => \e@data_cpu, \& \*(Aqtitle\*(Aq => \*(AqCPU\*(Aq, \& }); .Ve .PP This method allows you to add data to the graph object. The data are expected to be either a list of scalars (in which case pairs of elements are taken to be X,Y pairs) or a list of array references. In the latter case, the first two elements in each referenced array are taken to be X and Y, and the optional third element (if present) is used as the text to display for that point for show_data_values and rollover_values; otherwise the Y value itself is displayed. It can be called several times to add more data sets in. .SS "\fIclear_data()\fP" .IX Subsection "clear_data()" .Vb 1 \& my $graph\->clear_data(); .Ve .PP This method removes all data from the object so that you can reuse it to create a new graph but with the same config options. .SS "\fIburn()\fP" .IX Subsection "burn()" .Vb 1 \& print $graph\->burn(); .Ve .PP This method processes the template with the data and config which has been set and returns the resulting \s-1SVG.\s0 .PP This method will croak unless at least one data set has been added to the graph object. .SS "config methods" .IX Subsection "config methods" .Vb 2 \& my $value = $graph\->method(); \& my $confirmed_new_value = $graph\->method($value); .Ve .PP The following is a list of the methods which are available to change the config of the graph object after it has been created. .IP "\fIheight()\fR" 4 .IX Item "height()" Set the height of the graph box, this is the total height of the \s-1SVG\s0 box created \- not the graph it self which auto scales to fix the space. .IP "\fIwidth()\fR" 4 .IX Item "width()" Set the width of the graph box, this is the total width of the \s-1SVG\s0 box created \- not the graph it self which auto scales to fix the space. .IP "\fIcompress()\fR" 4 .IX Item "compress()" Whether or not to compress the content of the \s-1SVG\s0 file (Compress::Zlib required). .IP "\fItidy()\fR" 4 .IX Item "tidy()" Whether or not to tidy the content of the \s-1SVG\s0 file (XML::Tidy required). .IP "\fIstyle_sheet()\fR" 4 .IX Item "style_sheet()" Set the path to an external stylesheet, set to '' if you want to revert back to using the default internal version. .Sp The default stylesheet handles up to 12 data sets. All data series over the 12th will have no style and be in black. If you have over 12 data sets you can assign them all random colors (see the \fIrandom_color()\fR method) or create your own stylesheet and add the additional settings for the extra data sets. .Sp To create an external stylesheet create a graph using the default internal version and copy the stylesheet section to an external file and edit from there. .IP "\fIrandom_colors()\fR" 4 .IX Item "random_colors()" Use random colors in the internal stylesheet. .IP "\fIshow_data_values()\fR" 4 .IX Item "show_data_values()" Show the value of each element of data on the graph (or optionally a user-defined label; see add_data). .IP "\fIshow_data_points()\fR" 4 .IX Item "show_data_points()" Show a small circle on the graph where the line goes from one point to the next. .IP "\fIrollover_values()\fR" 4 .IX Item "rollover_values()" Shows data values and data points when the mouse is over the point. Used in combination with show_data_values and/or show_data_points. .IP "\fIdata_value_format()\fR" 4 .IX Item "data_value_format()" Format specifier to for data values (as per printf). .IP "\fImax_x_span()\fR" 4 .IX Item "max_x_span()" Maximum span for a line between data points on the X\-axis. If this span is exceeded, the points are not connected. This is useful for skipping missing data sections. If you set this value to something smaller than 0 (e.g. \-1), you will get an \s-1XY\s0 scatter plot with no line joining the data points. .IP "\fIstacked()\fR" 4 .IX Item "stacked()" Accumulates each data set. (i.e. Each point increased by sum of all previous series at same point). Default is 0, set to '1' to show. .IP "\fImin_yscale_value()\fR" 4 .IX Item "min_yscale_value()" The point at which the Y axis starts, defaults to '0', if set to '' it will default to the minimum data value. .IP "\fImax_yscale_value()\fR" 4 .IX Item "max_yscale_value()" The point at which the Y axis ends, if set to '' it will default to the maximum data value. .IP "\fIyscale_divisions()\fR" 4 .IX Item "yscale_divisions()" This defines the gap between markers on the Y axis, default is a 10th of the range, e.g. you will have 10 markers on the Y axis. \s-1NOTE:\s0 do not set this too low \- you are limited to 999 markers, after that the graph won't generate. .IP "\fIshow_x_labels()\fR" 4 .IX Item "show_x_labels()" Whether to show labels on the X axis or not, defaults to 1, set to '0' if you want to turn them off. .IP "\fIshow_y_labels()\fR" 4 .IX Item "show_y_labels()" Whether to show labels on the Y axis or not, defaults to 1, set to '0' if you want to turn them off. .IP "\fIy_label_format()\fR" 4 .IX Item "y_label_format()" Format string for presenting the Y axis labels (as per printf). .IP "\fIxscale_divisions()\fR" 4 .IX Item "xscale_divisions()" This defines the gap between markers on the X axis. Default is the entire range (only start and end axis labels). .IP "\fIstagger_x_labels()\fR" 4 .IX Item "stagger_x_labels()" This puts the labels at alternative levels so if they are long field names they will not overlap so easily. Default it '0', to turn on set to '1'. .IP "\fIrotate_x_labels()\fR" 4 .IX Item "rotate_x_labels()" This turns the X axis labels by 90 degrees. Default it '0', to turn on set to '1'. .IP "\fImin_xscale_value()\fR" 4 .IX Item "min_xscale_value()" This sets the minimum X value. Any data points before this value will not be shown. .IP "\fImax_xscale_value()\fR" 4 .IX Item "max_xscale_value()" This sets the maximum X value. Any data points after this value will not be shown. .IP "\fIshow_x_title()\fR" 4 .IX Item "show_x_title()" Whether to show the title under the X axis labels, default is 0, set to '1' to show. .IP "\fIx_title()\fR" 4 .IX Item "x_title()" What the title under X axis should be, e.g. 'Parameter X'. .IP "\fIshow_y_title()\fR" 4 .IX Item "show_y_title()" Whether to show the title under the Y axis labels, default is 0, set to '1' to show. .IP "\fIy_title()\fR" 4 .IX Item "y_title()" What the title under Y axis should be, e.g. 'Sales in thousands'. .IP "\fIshow_graph_title()\fR" 4 .IX Item "show_graph_title()" Whether to show a title on the graph, default is 0, set to '1' to show. .IP "\fIgraph_title()\fR" 4 .IX Item "graph_title()" What the title on the graph should be. .IP "\fIshow_graph_subtitle()\fR" 4 .IX Item "show_graph_subtitle()" Whether to show a subtitle on the graph, default is 0, set to '1' to show. .IP "\fIgraph_subtitle()\fR" 4 .IX Item "graph_subtitle()" What the subtitle on the graph should be. .IP "\fIkey()\fR" 4 .IX Item "key()" Whether to show a key, defaults to 0, set to \&'1' if you want to show it. .IP "\fIkey_position()\fR" 4 .IX Item "key_position()" Where the key should be positioned, defaults to \&'right', set to 'bottom' if you want to move it. .IP "x_label_formatter ()" 4 .IX Item "x_label_formatter ()" A callback subroutine which will format a label on the x axis. For example: .Sp .Vb 1 \& $graph\->x_label_formatter( sub { return \*(Aq$\*(Aq . $_[0] } ); .Ve .IP "\fIy_label_formatter()\fR" 4 .IX Item "y_label_formatter()" A callback subroutine which will format a label on the y axis. For example: .Sp .Vb 1 \& $graph\->y_label_formatter( sub { return \*(Aq$\*(Aq . $_[0] } ); .Ve .SH "EXAMPLES" .IX Header "EXAMPLES" For examples look at the project home page http://leo.cuckoo.org/projects/SVG\-TT\-Graph/ .SH "EXPORT" .IX Header "EXPORT" None by default. .SH "SEE ALSO" .IX Header "SEE ALSO" SVG::TT::Graph, SVG::TT::Graph::Line, SVG::TT::Graph::Bar, SVG::TT::Graph::BarHorizontal, SVG::TT::Graph::BarLine, SVG::TT::Graph::Pie, Compress::Zlib, XML::Tidy