iBrasten

My methods of calculating time are far superior to yours, in every way.

 

This is the blog of Brasten Sager, a freelance software developer, Mariners fan, guitarist, haphazard philosopher.

Scruffy Nearly PI'd

August 21, 2006 @ 07:28 AM

has emerged from his weekend-long seclusion with a functional first-cut of pie charts for Scruffy. From my initial glances at graphs and code, I’m thrilled!

We’re still a week away from integrating this into a Scruffy release. A.J.’s got a few more features to add before it’s ready for public consumption (very cool stuff, I must say). But I wanted everyone to know they’re on their way, and thank A.J. for his much-needed work on this!

To 0.2.3… and BEYOND!

I’ve been quietly patching bugs and adding minor features. We’re up to 0.2.2 right now, so if you’re having an issue, please try 0.2.2 and see if your problem continues.

For the next couple releases, I’ll be cleaning up some of the complexity that’s been inadvertently pushed down to the user-level API. For example:

  • Common options such as hiding values, number of grid lines, legend orientation, etc. should be specified using a simple API on the graph.
  • Value formatting should accept a block for simple transformations.
  • I want to reduce or eliminate the need to refer to internal Scruffy classes for common use cases. “graph.layout = :standard” is preferable to “graph.renderer = Scruffy::Renderers::Standard.new”

Please continue sending me feature requests and bug reports, or just say hi and let me know how you’re using Scruffy: brasten AT nagilum.com.

Shameless Promotion

Just to quickly piggyback on my 15-minutes of “fame,” I am actively pursuing Ruby/Rails work - contracts, consulting, etc. If you have a need for a Ruby developer, please contact me at brasten -AT nagilum.com!

4 Responses to “Scruffy Nearly PI'd”

  1. This gem simply rocks. I'm curious, however, can you post an example using the average graph? It would be cool to see. I did a few reports for my own use and now my whole company wants cool looking reports! Drat!

    Keith

  2. Keith- Sure thing. Currently there's a bug in the Average graph, but I'll show you how to get around it:
    graph = Scruffy::Graph.new
    graph.title = "Some Kind of Information"
    graph.add :average, graph.layers    
    graph.add :line, 'Jeff', [20, -5, 100, 70, 30, 106]
    graph.add :line, 'Jerry', [-10, 70, 20, 102, 201, 26]
    graph.add :line,  'Jack', [30, 0, 49, 29, 100, 203]
    graph.layers.first.relevant_data = false
    graph.point_markers = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
    The work-around is the graph.layers.first.relevant_data line. In future versions, Average will set that automatically, so that line won't be necessary. But at the moment your graph will fail if that line is not included. As a side-note, the average graph looks MUCH better in SVG than it does as a raster image, but it works both ways. Hope that helps!

    brasten

  3. I know you’re probably very busy and all, but seeing that its almost a year later I was wondering if you guys are still planning a 0.2.3 release? I’d love to see pie charts in future releases.

    Marston A.

  4. Hello, I was also wondering if you were doing XY or scatter graphs.

    Cheers James

    J Seigel