Graph3d.pm untested

filter: Statementstmt 0.0% 0 / 1 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 1 SCAR -
1 #==========================================================================
2 # Module: GD::Graph3d
3 #
4 # Copyright (C) 2000 Wadsack-Allen. All Rights Reserved.
5 #
6 #--------------------------------------------------------------------------
7 # Date Modification Author
8 # -------------------------------------------------------------------------
9 # 08Nov2001 Re-sourced to use standard module files and structure.
10 # The package is now GD-Graph3d which us what people expect JW
11 #==========================================================================
12 package GD::Graph3d;
13 $GD::Graph3d::VERSION = '0.63';
14 1;
15
16 =head1 NAME
17
18 GD::Graph3D - Create 3D Graphs with GD and GD::Graph
19
20 =head1 SYNOPSIS
21
22 use GD::Graph::moduleName;
23 my @data = (
24 ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
25 [ 1203, 3500, 3973, 2859, 3012, 3423, 1230]
26 );
27 my $graph = new GD::Graph::moduleName( 400, 300 );
28 $graph->set(
29 x_label => 'Day of the week',
30 y_label => 'Number of hits',
31 title => 'Daily Summary of Web Site',
32 );
33 my $gd = $graph->plot( \@data );
34
35 Where I<moduleName> is one of C<bars3d>, C<lines3d> or C<pie3d>.
36
37 =head1 DESCRIPTION
38
39 This is the GD::Graph3d extensions module. It provides 3D graphs for the
40 GD::Graph module by Martien Verbruggen, which in turn generates graph
41 using Lincoln Stein's GD.pm.
42
43 You use these modules just as you would any of the GD::Graph modules, except
44 that they generate 3d-looking graphs. Each graph type is described below
45 with only the options that are unique to the 3d version. The modules are
46 based on their 2d versions (e.g. GD::Graph::bars3d works like
47 GD::Graph::bars), and support all the options in those. Make sure to read
48 the documentation on GD::Graph.
49
50 =over 4
51
52 =item GD::Graph::pie3d
53
54 This is merely a wrapper around GD::Graph::pie for consistency. It also
55 sets 3d pie mode by default (which GD::Graph does as of version 1.22).
56 All options are exactly as in GD::Graph::pie.
57
58 =item GD::Graph::bars3d
59
60 This works like GD::Graph::bars, but draws 3d bars. The following settings
61 are new or changed in GD::Graph::bars3d.
62
63 =over 4
64
65 =item bar_depth
66
67 Sets the z-direction depth of the bars. This defaults to 10. If you have a
68 large number of bars or a small chart width, you may want to change this.
69 A visually good value for this is approximately
70 width_of_chart / number_of_bars.
71
72 =item overwrite
73
74 In GD::Graph::bars, multiple series of bars are normally drawn side-by-side.
75 You can set overwrite to 1 to tell it to draw each series behind the
76 previous one. By setting overwrite to 2 you can have them drawn on top of
77 each other, that is the series are stacked.
78
79 =item shading
80
81 By default this is set to '1' and will shade and highlight the bars (and axes).
82 The light source is at top-left-center which scan well for most computer
83 users. You can disable the shading of bars and axes by specifying a false
84 value for this option.
85
86 =back
87
88 =item GD::Graph::lines3d
89
90 This works like GD::Graph::lines, but draws 3d line. The following settings
91 are new or changed in GD::Graph::line3d.
92
93 =over 4
94
95 =item line_depth
96
97 Sets the z-direction depth of the lines. This defaults to 10. If you have a
98 large number of bars or a small chart width, you may want to change this.
99 A visually good value for this is approximately
100 width_of_chart / number_of_bars.
101
102 =item shading
103
104 By default this is set to '1' and will shade and highlight the line (and axes).
105 The light source is at top-left-center which scan well for most computer
106 users. You can disable the shading of lines and axes by specifiying a false
107 value for this option.
108
109 =back
110
111 =back
112
113 =head1 VERSION
114
115 0.63 (6 December 2002)
116
117 =head1 INSTALLATION
118
119 You will need to have the GD::Graph version 1.30 or later installed. You should also
120 have Perl version 5.005 or 5.6 installed.
121
122 To install, just do the normal:
123
124 perl Makefile.PL
125 make
126 make install
127
128 The documentation is in GD::Graph::Graph3d.pod.
129
130 =head1 AUTHOR
131
132 Jeremy Wadsack for Wadsack-Allen Digital Group.
133 <F<dgsupport at wadsack-allen dot com>>
134
135 Most of the modules are based on the GD::Graph modules by Martien Verbruggen.
136
137 =head1 LATEST RELEASE
138
139 The latest release is available from CPAN: http://www.cpan.org/.
140
141 =head1 COPYRIGHT
142
143 Copyright (c) 1999-2001 Wadsack-Allen. All rights reserved.
144
145 Much of the original code is from GD::Graph:
146
147 GIFgraph: Copyright (c) 1995-1999 Martien Verbruggen.
148
149 Chart::PNGgraph: Copyright (c) 1999 Steve Bonds.
150
151 GD::Graph: Copyright (c) 1999 Martien Verbruggen.
152
153 This package is free software; you can redistribute it and/or
154 modify it under the same terms as Perl itself.
155
156 =cut
157