Does anyone know how to generate CGI charts which are not images , the one I am using generates image files
e.g
$mygraph3->set( 'x_labels_vertical' => 1 );
$mygraph3->set_legend_font(GD::gdMediumBoldFont);
$mygraph3->set_legend('Test Plot');
my $myimage3 = $mygraph3->plot(\@data3)->png;
print "Content-type: image/png\n\n";
print "$myimage3";
If not an image, what would you want it to generate?
I want to generate some html plots so that scrolling the mouse over the plots show the values , an image doesn't look good .
Ah, you want gnuplot to act in HTML like it does over X11 or on Windows.
I wasn't aware of this ability of its but it seems to be documented:
3) Creating a basic web page with a single mouseable plot
The canvas terminal driver itself will create a basic html document containing
a mousable plot. The command options to do this are
set term canvas standalone mousing jsdir "http://myserver"
set output 'myplot.html'
This document contains
- a reference to style sheet gnuplot_mouse.css
- a reference to support script gnuplot_mouse.js
- a javascript function named 'gnuplot_canvas'
- a canvas element named 'gnuplot_canvas' that will be drawn in by the
javascript function of the same name
- an html table containing the readout for mouse coordinates, as well
as clickable icons for additional mousing operations
- an html table containing the readout for mouse coordinates, as well
as clickable icons for additional mousing operations
The *.css and *.js references point back to whatever source URL you specified
in the jsdir option to the 'set term' command. For example:
<link text="text/css" href="http://myserver/gnuplot_mouse.css" rel="stylesheet">
In order for viewers to use your plot document, they must be able to access the
*.css and *.js files via the URL embedded in the document.
Thnx let me try to generate a few webpages and see if it works the way I want .