ANN: SVG::Graph 0.3.0

S

Sean Russell

Hi yous,

This is to announce a new project, SVG::Graph. SVG::Graph is a
library for generating SVG chart graphs, which are a type of plot
where the values one axis are not scalar. SVG::Graph allows you to
generate line, bar, and pie charts.

The home of SVG::Graph is:

http://www.germane-software.com/software/SVG/SVG::Graph

SVG::Graph is a loose port of Perl's SVG::TT::Graph. I say "loose
port", because I reimplemented most of the code; the original was
based heavily on templates, had a lot of duplicate code, and wasn't
very modularized. However, if you're familiar with the Perl version,
you'll find the end-user API to be very familiar.

I welcome bugs, suggestions, wads of cash, cars, job offers... all the
usual forms of compensation and feedback. Of course, this is open
source and free software. There's a bug page at:

http://www.germane-software.com/cgi-bin/roundup/svg-graph

There are screenshots here:

http://www.germane-software.com/software/SVG/SVG::Graph/screenshots.html

and here's a code example:

require 'SVG/Graph/Pie'

graph = SVG::Graph::pie.new( {
:graph_title => "Apple Pies Sold, Q1",
:show_graph_title => true,
:fields => %w{ January February March },
:show_data_labels => true,
:expand_greatest => true,
} )

graph.add_data( {:data => [24, 30, 12] } )
puts graph.burn

Cheers!

--- SER
 
F

Florian Gross

Sean said:

Looks nice and I think this library will be useful to me. :)
and here's a code example:

require 'SVG/Graph/Pie'

graph = SVG::Graph::pie.new( {
:graph_title => "Apple Pies Sold, Q1",
:show_graph_title => true,
:fields => %w{ January February March },
:show_data_labels => true,
:expand_greatest => true,
} )

Just wanted to tell you that there's no need for the curly brackets
there. This will work as well:

graph = SVG::Graph::pie.new(
:graph_title => "Apple Pies Sold, Q1",
:show_graph_title => true,
:fields => %w{ January February March },
:show_data_labels => true,
:expand_greatest => true,
)

graph.add_data( {:data => [24, 30, 12] } )
puts graph.burn

Same here:

graph.add_data:)data => [24, 30, 12])

Regards,
Florian Gross
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top