On Aug 15, 2006, at 9:02 AM, Brasten Sager wrote:
This looks like something I can use in my next project. I was going to use gruff and/or sparklines. Being able to send SVG to the browser opens up a lot of possibilities so I'll give Scruffy a go when it comes time. Plus, the graphs look great and I can probably use batik for my application. I'd suggest taking the examples from your blog and putting them in the rdoc so it's easier for folks to find and get started. The Rakefile rdoc section could even generate PNGs right from the examples! Also, the render method could use some better examples. There's a lot of docs that still need to be finished but I think just this little bit should help more folks adopt Scruffy early and get you some feedback. I'm about to mention sparklines a bunch. Here's a Ruby implementation: What are the implications of making a whole bunch of little sparklines with Scruffy? I noticed you internally work with a minimum graph size and scale down at raster time: if options[:as] && (options[:size][0] <= 300 || options[:size][1] <= 200) options[:actual_size] = options[:size] options[:size] = [800, (800.to_f * (options[:actual_size][1].to_f / options[:actual_size][0].to_f))] puts options[:size].inspect end Also, does the case of requesting a 200x20 graph (a long sparkline) do what you want here? It will be working with 800x80 internally. A single method to make a sparkline in Graph might be useful. Just to give folks a convention. Since you haven't done the pie layer yet I have a suggestion. Putting little pie chart slices (like sparklines) next to an index for a big pie chart is a nice alternative to a bunch of callouts or an index with simple box colors. Some of the svg options like stroke and fill could use refactoring. In particular, there's no way to access stroke-dasharray for the line graphs right now (that I can see anyway). You probably were headed that way. I like the design. Didn't take very long to get my head around it. I'd even venture a guess that this could end up the de facto graphing solution. -david |
_______________________________________________ PDXRuby mailing list [email protected] IRC: #pdx.rb on irc.freenode.net http://lists.pdxruby.org/mailman/listinfo/pdxruby
