« Return to Thread: Graphs and Plots

Re: Graphs and Plots

by Jeroen Michiel :: Rate this Message:

Reply to Author | View in Thread

I'll experiment with both and see what I'll chose.

What I would like to do is make a grokker for specialization of a grok.View to generate such dynamic graphs, that automatically creates a graph object in the background and outputs it in it's render function while setting the appropriate Content-Type, so that I can simply make a view derived from it and create the actual data series in the update function.

Something like this:

class MySpread(Plot)
   grok.context(IStatisticalData)
   grok.name('spread')

   def update(self)
        self.graph.plot(data)

I've read about how to make your own grokkers and stuff, and I think I understand most of it, except for this: what I'm trying to do is make a special sort of view, so should I derive my Plot class from grok.View or from BrowserPage, and can I derive the grokker from the ViewGrokker in grokcore to simplify things and make sure it behaves as a regular grok View for the rest, or do I have to do it al over myself?

 « Return to Thread: Graphs and Plots