SVG::Graph::Pie question - labels and padding

Hi all,

Ruby 1.8.5
svg-graph 0.6.1

I’ve got the following code snippet that works fine, but I have two
issues.

First, I’d like to pad the pie chart to the top and right so that the
pie chart doesn’t overlap with the field labels, and is a little lower
on the screen.

Second, for the pie slices with small percentages, e.g. “Dual SVC”, I’d
like to specify an external label somehow, because it’s too squished
together at the moment to be readable. Perhaps with a line, pointing
to the field label, slightly outside of the pie chart itself. Does
that make sense?

Here’s some sample code that demonstrates how things look at the
moment:

require ‘SVG/Graph/Pie’

fields = [
‘All’, ‘Install’, ‘Change’, ‘Disconnect’, ‘T’, ‘F’, ‘Dual SVC’
]

graph = SVG::Graph::Pie.new(
:fields => fields,
:show_data_labels => true,
:datapoint_font_size => 10
)

graph.add_data(
:data => [56655, 26264, 12193, 13606, 4161, 2638, 1004],
:title => ‘Count’
)

File.open(‘fallout.svg’, ‘w+’){ |fh|
fh.print graph.burn
}

Ideas welcome.

Regards,

Dan

PS - I’m currently using Firefox 1.5.x to view the .svg files.