Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

HTML scattered point graphs

by sdyates (Scribe)
on Oct 06, 2003 at 17:55 UTC ( [id://297017]=perlquestion: print w/replies, xml ) Need Help??

sdyates has asked for the wisdom of the Perl Monks concerning the following question:

Ok, this is a good one. I am looking for ideas on how to use perl to create graphs that can be printed in HTML. I am creating thousands of data that I want ploted and viewable in HTML.

I am sure I could parse the data enough and have it redirected in to a file and have excel read it and create a graph that way, but I wan to do this the right way and be able to create a report from a web interface and keep it simple for the user.

Any ideas? I want perl to handle all of this. Any good reading material you can give me before I embark on reinventing the wheel?

Replies are listed 'Best First'.
Re: HTML scattered point graphs
by BUU (Prior) on Oct 06, 2003 at 18:06 UTC
Re: HTML scattered point graphs
by hardburn (Abbot) on Oct 06, 2003 at 18:03 UTC

    If you're talking pure HTML, you can create a huge table with each table cell representing a point on the graph. You'll only do this if you are certifiably insane (for which you'd be in good company, as insanity is a popular attribute of Perl programmers).

    If you want something practical, browse the Image::, Graphics::, and Chart:: namespaces on CPAN, which will show you how to create a (for example) PNG image on the fly.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    Note: All code is untested, unless otherwise stated

      One note from my experience with using HTML tables as a raster graphics file format - browsers don't take well to tables with 250,000 cells.. :) If you're impatient, don't bother.

      Makeshifts last the longest.

Re: HTML scattered point graphs
by kesterkester (Hermit) on Oct 07, 2003 at 13:37 UTC
    GD::Graph::xylinespoints sounds like just what you're looking for.

    I've written a command line plotter that uses it-- it uses a special tab-delimited data format for the points, but you just need to rewrite read_data () to get around that.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://297017]
Approved by jdtoronto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (10)
As of 2024-04-18 16:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found