1CGI::Application::PlugiUns:e:rDCBCGIoIPn:rt:orAfipibpluleti:ec:daGtrPiaeoprnhl::::DPHolTcuMugLmi(en3n:)t:aDtBiIoPnrofile::Graph::HTML(3)
2
3
4

NAME

6       CGI::Application::Plugin::DBIProfile::Graph::HTML - VERY basic pure
7       html vertical bar graphing for CAP:DBIProfile.
8

SYNOPSIS

10           # in httpd.conf
11           SetVar CAP_DBIPROFILE_GRAPHMODULE CGI::Application::Plugin::DBIProfile::Graph::HTML
12           PerlSetVar CAP_DBIPROFILE_GRAPHMODULE CGI::Application::Plugin::DBIProfile::Graph::HTML
13

DESCRIPTION

15       This module is provided as a basic implementation of graphing for
16       CAP:DBIProfile. It can be used as an example to develop other, more
17       sophisticated, graphing solutions.
18

GRAPH PLUGIN DEVELOPMENT

20       The graphing plugin must have a method called "build_graph", which must
21       accept options as a hash.
22
23       It should return a scalar or scalar ref holding the HTML output needed
24       to generate your graph.
25
26       The following options will be passed to the "build_graph" method:
27
28       self
29           The cgiapp object.
30
31       mode_param
32           $self->mode_param - the runmode variable used to determine runmode
33           (usefull for creating links back to ourselves).
34
35       title
36           A textual title for your graph. You don't have to use this, but is
37           there if you want it.
38
39       ylabel
40           Label for values we're graphing. Either "Count" or "Seconds".
41
42       data
43           An array of the datapoints to graph.
44
45       tags
46           Labels for each datapoint which match the labels that will be used
47           on the sql statement list (1 to however many items there are).
48
49       The easiest graphs to implement are fully inline - ie. it doesn't need
50       to make any external calls (no <image> or <embed> tags and such).
51       CGI::Application::Plugin::DBIProfile::Graph::HTML is an example of
52       this. Other possible candidates are Plotr and Open Flash Chart (using
53       js interface to populate data).
54
55       Another inline solution is to use the <img src="data:uri"> scheme. An
56       example of this can be found in
57       CGI::Application::Plugin::DBIProfile::Graph::GDGraphInline. Please
58       note, this isn't supported under MSIE.
59
60       In order to generate a graph that isn't inline, you'll need to pass the
61       data to be graphed with your call to the external object. For example,
62       if you want to use GDGraph, you could create a separate cgi script that
63       returns graphs based on params passed to it, and return an approapriate
64       image tag to from your graphing module. For example:
65
66           <img src="/cgi-bin/graph.pl?data=20,14,42&tags=1,2,3">
67
68       Another way, would be to add a runmode in a CGI::Application "init"
69       hook, and pass that runmode in a link back to the same script, and
70       include your graph module in our script with a use statement. An
71       example of this can be found in
72       CGI::Application::Plugin::DBIProfile::Graph::SVGTT.
73

REQUIREMENTS

75           L<HTML::Template>
76

SEE ALSO

78           L<CGI::Application::Plugin::DBIProfile>
79           L<CGI::Application::Plugin::DBIProfile::Graph::GDGraphInline>
80           L<CGI::Application::Plugin::DBIProfile::Graph::SVGTT>
81

AUTHOR

83           Joshua I Miller, L<unrtst@cpan.org>
84
86       Copyright 2007 Joshua Miller, all rights reserved.
87
88       This program is free software; you can redistribute it and/or modify it
89       under the same terms as Perl itself.
90
91
92
93perl v5.28.0              CGI::App2l0i1c8a-t0i7o-n1:4:Plugin::DBIProfile::Graph::HTML(3)
Impressum