DBD-Chart

 view release on metacpan or  search on metacpan

dbdchart.html  view on Meta::CPAN

or if no qualifier is provided.
A Perl compatible array of hashrefs of attributes and coordinates is provided if the
<code>MAPTYPE</code> qualifier is 'PERL'.<p>
The resulting HTML imagemap will have the following behaviors based on the type of chart/graph
requested, and the values specified (if any) for the MAPURL and MAPSCRIPT qualifiers:<p>
<table border=1>
<tr bgcolor=lightsteelblue><th>Graph Type</th><th>Hotspot Area</th><th>ALT tag</th><th>Special Variable<br>Values</th></tr>
<tr bgcolor=white><td valign=top align=center><b>Piechart</b></td>
	<td valign=top>Polygon starting from center and<br>connecting 10&deg; arcs along the circumference of the wedge.</td>
	<td valign=top>Wedge value followed by wedge percent in parentheses<br>
	e.g., "1234(16%)"</td>
	<td>
		<ol>
		<li>:PLOTNUM = 0
		<li>:X = &lt;wedge-label&gt;
		<li>:Y = &lt;assoc. wedge value&gt;
		<li>:Z = &lt;wedge's percent of total&gt;
		</ol>
	</td></tr>
<tr bgcolor=white><td valign=top align=center><b>2-D Barchart and Histogram</b></td>
	<td valign=top>Complete area of each bar</td>
	<td valign=top>Range value for the bar</td>
	<td>
		<ol>
		<li>:PLOTNUM = &lt;range number of the bar&gt;
		<li>:X = &lt;domain label for the bar&gt;
		<li>:Y = &lt;range value for the bar&gt;
		<li>:Z = &lt;empty-string&gt;
		</ol>
	</td></tr>
<tr bgcolor=white><td valign=top align=center><b>3-D Barchart(Histogram)<br>(including 3-axis)</b></td>
	<td valign=top>Complete area of top(right side) face of each bar</td>
	<td valign=top>Range value for the bar</td>
	<td>
		<ol>
		<li>:PLOTNUM = &lt;range number of the bar&gt;
		<li>:X = &lt;domain label for the bar&gt;
		<li>:Y = &lt;range value for the bar&gt;
		<li>:Z = &lt;Z-axis label value for the bar&gt;
		</ol>
	</td></tr>
<tr bgcolor=white><td valign=top align=center><b>Line, point, area graph</b></td>
	<td valign=top>8-pixel diameter circle centered on each datapoint</td>
	<td valign=top>(domain, range) values of the datapoint</td>
	<td>
		<ol>
		<li>:PLOTNUM = &lt;range number of the plot&gt;
		<li>:X = &lt;domain value for the datapoint&gt;
		<li>:Y = &lt;range value for the datapoint&gt;
		<li>:Z = &lt;empty-string&gt;
		</ol>
	</td></tr>
<tr bgcolor=white><td valign=top align=center><b>Candlestick</b></td>
	<td valign=top>8-pixel diameter circle centered on<br>each datapoint, both top and bottom of stick</td>
	<td valign=top>(domain, range) values of the datapoint</td>
	<td>
		<ol>
		<li>:PLOTNUM = &lt;range number of the plot&gt;
		<li>:X = &lt;domain value for the datapoint&gt;
		<li>:Y = &lt;range value for the datapoint&gt;
		<li>:Z = &lt;'top' | 'bottom'&gt; depending on which endpoint of candlestick is focused.
		</ol>
	</td></tr>
<tr bgcolor=white><td valign=top align=center><b>Box & Whisker</b></td>
	<td valign=top>the area of the plotted box, and an<br>
	8-pixel diameter circle centered on<br> the lower and upper ends of the whicksers</td>
	<td valign=top>median[lower quartile..upper quartile] values of the box, and
	the values of the lower and upper extreme datapoint</td>
	<td>
		<ol>
		<li>:PLOTNUM = &lt;range number of the plot&gt;
		<li>:X = &lt;median value&gt;
		<li>:Y = &lt;lower quartile value&gt;
		<li>:Z = &lt;upper quartile value&gt;
		</ol>
	</td></tr>
<tr bgcolor=white><td valign=top align=center><b>Gantt chart</b></td>
	<td valign=top>the area of each task's bar</td>
	<td valign=top>start date '->' end date</td>
	<td>
		<ol>
		<li>:PLOTNUM = &lt;taskname&gt;
		<li>:X = &lt;start date/time&gt;
		<li>:Y = &lt;end date/time&gt;
		<li>:Z = &lt;pct. complete:assignee&gt;
		</ol>
	</td></tr>
<tr bgcolor=white><td valign=top align=center><b>Quadtree chart</b></td>
	<td valign=top>the area of each subdivision</td>
	<td valign=top>[Category:subcategory:...]item, value, intensity</td>
	<td>
		<ol>
		<li>:PLOTNUM = &lt;categorized item name&gt;
		<li>:X = &lt;value&gt;
		<li>:Y = &lt;intensity&gt;
		<li>:Z = &lt;NA&gt;
		</ol>
	</td></tr>
</table>
<p>
A Perl imagemap will have the following behaviors based on the type of chart/graph
requested, and the values specified (if any) for the MAPURL and MAPSCRIPT qualifiers:<p>
<table border=1>
<tr bgcolor=lightsteelblue><th rowspan=2>Graph Type</th><th colspan=6>Attributes &amp; Values</th></tr>
<tr bgcolor=orange>
	<th><code>shape</code></th>
	<th><code>coordinates</code></th>
	<th><code>plotnum</code></th>
	<th><code>X</code></th>
	<th><code>Y</code></th>
	<th><code>Z</code></th></tr>
<tr bgcolor=white><td valign=top align=center><b>Piechart</b></td>
	<td valign=top>POLY</td>
	<td valign=top>arrayref of (x,y) image pixel coordinates of polygon
	starting from center and connecting 10&deg; arcs along the circumference of the wedge.</td>
	<td valign=top align=center>0</td>
	<td valign=top align=center>wedge label</td>
	<td valign=top align=center>associated wedge value</td>
	<td valign=top align=center>wedge's percent of total</td></tr>
<tr bgcolor=white><td valign=top align=center><b>2-D Barchart and Histogram</b></td>
	<td valign=top>RECT</td>
	<td valign=top>arrayref of (x,y) image pixel coordinates of rectangle of associated bar</td>
	<td valign=top align=center>range number of the bar</td>
	<td valign=top align=center>domain label</td>
	<td valign=top align=center>range value</td>
	<td valign=top align=center>undef</td></tr>
<tr bgcolor=white><td valign=top align=center><b>3-D Barchart(Histogram)<br>(including 3-axis)</b></td>
	<td valign=top>POLY</td>
	<td valign=top>arrayref of (x,y) image pixel coordinates of top(right side) face of associated bar</td>
	<td valign=top align=center>range number of the bar</td>
	<td valign=top align=center>domain label for the bar</td>
	<td valign=top align=center>range value for the bar</td>
	<td valign=top align=center>Z-axis label value for the bar</td></tr>
<tr bgcolor=white><td valign=top align=center><b>Line, point, area graph</b></td>
	<td valign=top>CIRCLE</td>
	<td valign=top>arrayref of (xcenter, ycenter, radius) image pixel coordinates of 8-pixel
	diameter circle centered on the datapoint</td>
	<td valign=top align=center>range number of the plot</td>
	<td valign=top align=center>domain value for the datapoint</td>
	<td valign=top align=center>range value for the datapoint</td>
	<td valign=top align=center>undef</td></tr>
<tr bgcolor=white><td valign=top align=center><b>Candlestick</b></td>
	<td valign=top>CIRCLE</td>
	<td valign=top>arrayref of (xcenter, ycenter, radius) image pixel coordinates of 8-pixel diameter
	circle centered on<br>each datapoint, both top and bottom of stick</td>
	<td valign=top align=center>range number of the plot</td>
	<td valign=top align=center>domain value for the datapoint</td>
	<td valign=top align=center>range value for the datapoint</td>
	<td valign=top align=center>'top' | 'bottom', depending on which candlestick endpoint is focused.</td></tr>
<tr bgcolor=white><td valign=top align=center><b>Box & Whisker</b></td>
	<td valign=top>RECT, CIRCLE</td>
	<td valign=top>arrayref of (x,y of upper left of box, x.y of lower right of box) image pixel coordinates of
	the box</td>
	<td valign=top align=center>range number of the plot</td>
	<td valign=top align=center>median value of the box</td>
	<td valign=top align=center>lower quartile value of the box</td>
	<td valign=top align=center>Upper quartile value of the box.</td></tr>
<tr bgcolor=white><td valign=top align=center><b>Gantt</b></td>
	<td valign=top>RECT</td>
	<td valign=top>arrayref of (x,y of upper left of bar, x.y of lower right of bar)
		image pixel coordinates of each task's bar</td>
	<td valign=top align=center>task name</td>
	<td valign=top align=center>start date/time</td>
	<td valign=top align=center>end date/time</td>
	<td valign=top align=center>pct. complete:assignee</td></tr>
<tr bgcolor=white><td valign=top align=center><b>Quadtree chart</b></td>
	<td valign=top>RECT</td>
	<td valign=top>arrayref of (upper left x,y; lower right x,y)
		image pixel coordinates of each item's subdivision</td>
	<td valign=top align=center>categorized item name</td>
	<td valign=top align=center>item value</td>
	<td valign=top align=center>item intensity</td>
	<td valign=top align=center>N/A</td></tr>
</table>
<p>

<a name="errors"></a>
<h3>Error Handling</h3><p>

Any errors generated from improper SQL usage are flagged with an error value of -1, and
appropriate text in the errstr. Errors emanating from DBD::Chart::Plot
will be flagged in err and errstr with whatever info is returned.
<p>

<a name="diags"></a>
<h3>Diagnostics</h3><p>

DBI provides the <code>trace()</code> function to enable various levels
of trace information. DBD::Chart currently doesn't add any traces to this.
<p>

<a name="specattr"></a>
<h3>Driver Specific Attributes</h3><p>

<ul>
<li>chart_noverify - connect() attribute; when set to 1, verification of data values with target
columns is bypassed (to provide some performance improvement).<p>
<li>chart_map_modifier - prepare() attribute; can be set to a sub reference to provide a
application-specific function for modifying HTML imagemap elements. The specified
sub will be passed a hashref containing the following elements:<p>
<ul>
<li>URL - any string provided with the MAPURL property
<li>Script - an string provided with the MAPSCRIPT property
<li>AltText - the ALT tag text that will be associated with the datapoint
<li>PLOTNUM - the associated plot number
<li>X - the X value of the datapoint
<li>Y - the Y value of the datapoint
<li>Z - the Z value of the datapoint
</ul>



( run in 1.177 second using v1.01-cache-2.11-cpan-df04353d9ac )