[jifty-devel] Chart plugin

Thomas Sibley trs at bestpractical.com
Tue Jul 31 23:48:21 EDT 2007

Andrew Sterling Hanenkamp wrote:
> You mentioned adding support for PlotKit on the channel, which looking
> forward to. If you want I just wanted to let you know that if you wanted 
> to take license with the API, please do. What I put together was just 
> the bare necessities to make it work and not necessarily what I consider 
> to be ideal. And chart() definitely needs more keys with meaning 
> defined. Currently, I only define width, height, type, and data (and 
> even type is a little vague).

For the PlotKit renderer I just committed, the render function
translates the types defined in the POD to types PlotKit understands and
warns on a type it doesn't.  I think the best idea for types is to
standardize on a common set and have the renderers translate from our
common name to its own specific name.

> I also wanted to mention that it's undocumented, but if you pass a 
> coderef to any of the parameters they are processed into the return 
> values of those coderefs (which are passed the argument list). This 
> seemed like a good idea at the time, but now I'm not sure. Seems a 
> little gratuitous in hindsight.

Yep, saw this while in the code.  It's there now and won't get in the
way.  I can see possibilities where it might be useful.

> I have considered adding the alternate notion of the "data" key, which 
> is currently used to set the data sets used by the chart. The alternate 
> notion would be to add each data by point. The Renderer superclass could 
> then provide a normalization routine to convert between them as necessary.

I think the way it is now is more intuitive.  One change might be to
split out the labels from the data in the argument list.


More information about the jifty-devel mailing list