DBD-Chart

 view release on metacpan or  search on metacpan

dbdchart.html  view on Meta::CPAN

	<td valign=top>None.</td>
	<td valign=top>Yes</td>
	<td valign=top>Single string value of a valid scripting tag.
	Special variable name interpolation is same as for MAPURL.
	</td></tr>
</table><p>
<b>NOTE:</b>For composite images (via derived tables), attributes listed as "Global = Yes"
can only be specified in the outer predicate of the SELECT statement (i.e., CANNOT be
included in the predicates of individual derived table subqueries).
<p>
<b>General Restrictions:</b><br>
<ul>
<li>Only a single level of derived tables is allowed.
<li>no expressions (e.g., X + Y) or functions (e.g., AVG(X)) are allowed.<br>
<li>ordering of wedges and bars in pie and barcharts is determined by the order the rows are
INSERTed.<br>
<li>Ordering of plot points in line, area, and point graphs with numeric and temporal domains is
ascending left to right on the X-axis, ascending bottom to top on Y-axis. Graphs with symbolic
domains are plotted in the order they are INSERT'd.<br>
<li>When generating area graphs with multiple range valuesets (i.e., more the 1 set of Y values),
the order in which the range valuesets are plotted is column 2, column 3,...column N.
This order may cause some ranges to be completely obscured by the areagraph of a succeding range. You'll
need to experiment with the order of your range valuesets to get the best view.<br>
<li>Datasources for the chart(s) may be either
<ul>
<li>a table explicitly CREATEd on the dbi:Chart database handle that has been
populated via INSERTs
<li>a valid DBI statement handle which has been <code>execute()</code>'d.
When a parameterized FROM is specified in a SELECT statement, the application
must bind a <code>prepare()</code>'d and <code>execute()</code>'d
statement handle from any valid DBI data source, from which DBD::Chart will
subsequently <code>fetch()</code> the data for populating the chart. In that case,
the application does not need to explicitly CREATE and INSERT to a table for
the chart. Obviously, the application must still be careful that the column data
returned by the bound statement handle is of the proper format (as described
above) and does not returned an excessive number of rows - DBD::Chart currently
generates an error if more than 10,000 rows is returned by such a bound statement
handle.
</ul><p>
Note that using the same statement handle for multiple derived tables may not produce
the expected result, since the first derived table subquery will consume the entire
result set. In that case, either explcitly create and populate a DBD::Chart table,
or open multiple statement handles of the same SELECT statement if possible.
<p>
<li>Support for JPEG images on Windows platforms with ActiveState Perl requires installing
the Tk::JPEG PPM from ActiveState.
<li>Support for GIF image formats requires a compatible version of the GD
modules (pre 1.20).
<!-- <li>Support for SVG image formats requires SVG.pm v. 2.0 or greater. -->
<li>Composite images can only be constructed from compatible chart types:
<ul>
<li>piecharts, Gantt charts, quadtrees, and 3-axis barcharts/histograms must be used alone (i.e., a single graph composite).
<li>histograms are only compatible with other histograms
<li>3-d barcharts are only compatible with other 3-d barcharts
<li>all other types are compatible with one another
</ul>
<li>The domain types for the individual graphs in a composite image
must be compatible, i.e., numeric with numeric, temporal with temporal, and
symbolic with symbolic.
<li>Named derived table queries cause the specified name to be used to identify the
associated plot in any legend
generated for the composite image. If no name is given for a derived table query,
the default name "PLOTn", where n is the sequence number of the query in the image,
will be used.
<li>As of version 0.61, syntax has been modified to more closely adhere to standard SQL.
The following changes were made:
<ul>
<li>Hyphenated property names (X-LOG, Y-LOG, X-AXIS, Y-AXIS, Z-AXIS, X-ORIENT, 3-D) have
replaced the hyphen with an underscore; in addition, '3-D' has been replaced with THREE_D.
<li>Color and shape names are now treated as string values and should be quoted.
<li>The IN operator is now supported when specifying a value list for the COLOR, SHAPE,
or ICON properties.
</ul>
Please note that <b>all prior behaviors have been preserved</b> in order to maintain
backward compatibility. These changes were made to ease any future interoperability
with other SQL based tools, e.g., SQL::Statement.
</ul>
</li><p>
<a name="update"></a>
<li><code><b>UPDATE <i>chartname</i><br>
SET <i>&lt;domain-name&gt;</i> = <i>&lt;? | literal&gt;</i><br>
[ WHERE <i>&lt;domain-value&gt;</i> <i>&lt;operator&gt;</i> <i>&lt;? | literal&gt;</i>]</b></code><p>
Replaces the point with the specified value with a new point value.
Valid <i>&lt;operator&gt;</i>s are &lt;, &lt;=, =, &gt;, &gt;=, &lt;&gt;.
E.g., this could be used with
a bar chart to refresh the bar values in realtime (e.g., monitor User's CPU usage).<p>

<a name="delete"></a>
<li><code><b>DELETE FROM <i>chartname</i><br>
[ WHERE <i>&lt;domain-name&gt;</i> <i>&lt;operator&gt;</i> <i>&lt;? | literal&gt;</i>]</b></code><p>
Removes one (or more) data points from the chart. Valid <i>&lt;operator&gt;</i>s are
&lt;, &lt;=, =, &gt;, &gt;=, &lt;&gt;.
E.g., this could be used to render realtime
scrolling linegraphs where old values are rolled off the left of the graph, and new values are appended
on the right.<br>
<b>NOTE:</b>Deleting from a barchart, then inserting new rows, will cause new
rows to be displayed at the right end of the chart. Use UPDATE if you want to
modified the bar values, but maintain the original display order.
</li>

</ul>
Note that the &lt;, &lt;=, &gt;, &gt;= predicate operators now fully support temporal values.
<p>

<a name="colormap"></a>
<h3>Colormaps</h3>
The colors used to render the various image elments can be adjusted by the
application by modifying the predefined COLORMAP table. The COLORMAP table
is predefined as follows:
<pre>
CREATE TABLE COLORMAP (
	Name VARCHAR(30),	-- name of color
	RedValue INTEGER,	-- value of red component
	GreenValue INTEGER,	-- value of green component
	BlueValue INTEGER,	-- value of blue component
);
</pre>
The color component values must be specified between 0 and 255.
<p>
The following values are predefined in the COLORMAP table:
<table border=1><tr><th bgcolor=lightgrey>Name</th><th bgcolor=red>RedValue</th><th bgcolor=green>GreenValue</th><th bgcolor=blue>BlueValue</th></tr>

dbdchart.html  view on Meta::CPAN

The URL and Script will be subject to special variable replacement after
the callback returns.<p>
<li>chart_type_map - prepare() attribute; used to provide NAME, TYPE, etc.
attributes for DBI statement handle datasources which do not provide
native support for those attributes (e.g., DBD::CSV). Specifies an
arrayref of hashrefs containing the NAME, TYPE, PRECISION, and SCALE
values for each column to be fetched from the statement handle to be
used as the datasource during rendering. If multiple statement handle
datasources are used (e.g., for composite images), then an array ref of
arrayrefs of hashrefs must be provided (one arrayref per statement handle).
</ul><p>

<a name="funcs"></a>
<h3>Driver Specific Functions</h3><p>

<b>NOTE:</b> As of DBI-1.23 and DBD::Chart 0.70, DBD::Chart supports the native DBI
array binding interfaces bind_param_array() and execute_array(). The
<code>$sth->chart_bind_param_array($paramnum, \@paramary [\%attr | $typespec])</code>
and <code>$sth->chart_bind_param_status(\@stsary | \%stshash)</code> interfaces
are now deprecated (though they continue to be supported).
</ul>

<i><b>Note:</b> array binding of output values is not supported, since
SELECT only returns a single row at a time, namely, the chart image and (optionally)
an imagemap.</i><p>

<a name="history"></a>
<h2>Change History</h2><p>

Release 0.80:
<ul>
<li>support for programmable fonts (untested)
<li>enhanced SQL syntax for DBIx::Chart support
<li>added chart_type_map to permit external type specs for parameterized datasources
<li>add BORDER property to make image border programmable
<li>fix origin alignment for areagraphs w/ linegraphs
<li>fix 3-D piecharts where width >> height
<li>improved 3-D piechart label positioning
</ul>
<p>
Release 0.74:
<ul>
<li>fixed scaling of 3-D barchart with KEEPORIGIN=1
<li>fixed incorrect values shown on 3-D barcharts/histograms
</ul>
<p>
Release 0.73:
<ul>
<li>fixed scaling of 3-D barchart with small datasets
<li>fixed missing axis labels for 3-D barcharts/histograms
<li>improved scaling for sine-point line/point graphs, barchart
<li>fix to propagate icon-related error msgs up to DBI
<li>fixed runaway recursion for quadtrees
<li>fixed divide-by-zero error on quadtrees with single intensity
<li>corrected pod SYNOPSIS section
</ul>
<p>
Release 0.72:
<ul>
<li>fixed SHOWVALUES for bars/histos when clipped origin
<li>improved legend placement
</ul>
<p>
Release 0.71:
<ul>
<li>added ANCHORED property
<li>fixed SHOWVALUES for line/point/areagraphs
<li>fixed LINEWIDTH to be a local, rather than global, property
</ul>
<p>
Release 0.70:
<ul>
<li>added quadtrees
<li>added stacked barcharts/histograms/candlesticks/areagraphs
<li>fixed SHOWVALUES to apply to individual graphs, rather than as a global
property, unless explicitly applied to the global image.
<li>implemented official DBI parameter array binding i/f.
<li>successfully tested with DBI::PurePerl
<li>added LINEWIDTH property
<li>added chart_map_modifier prepare() attribute
<li>added support for NULLs in SHAPES list
<li>improved heuristic scaling of TIMESTAMP datatypes
<li>added some simple installation tests
</ul>

Release 0.63:
<ul>
<li>fix Gantt chart date axis tick alignment
</ul><p>

Release 0.62:
<ul>
<li>fix numeric month validation
</ul><p>

Release 0.61:
<ul>
<li>fix multicolor histograms
<li>fix :PLOTNUM escape processing for HTML imagemaps
<li>improved SQL compatibility:
<ul>
<li>replaced hyphenated property names w/ underscore
<li>support quoted color and shape names
<li>support IN operator for valuelists
</ul>
<li>fix for tick labels overwriting axis labels
<li>fix for temporal data alignment
</ul><p>

Release 0.60:
<ul>
<li>temporal data type support
<li>histogram support
<li>composite images via derived tables
<li>user defined colors
<li>Gantt charts
</ul>

Release 0.52:
<ul>
<li>fix for 2D max range values



( run in 0.882 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )