def burn
raise "No data available" unless @data.size > 0
calculations if methods.include? 'calculations'
start_svg
calculate_graph_dimensions
@foreground = Element.new( "g" )
draw_graph
draw_titles
draw_legend
draw_data
@graph.add_element( @foreground )
style
data = ""
@doc.write( data, 0 )
if @config[:compress]
if @@__have_zlib
inp, out = IO.pipe
gz = Zlib::GzipWriter.new( out )
gz.write data
gz.close
data = inp.read
else
data << "<!-- Ruby Zlib not available for SVGZ -->";
end
end
return data
end