Trends and Graphics

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Trends and Graphics

Mike Hales
I am going to be starting a small seaside project soon to provide a limited web interface for our existing VW and Gemstone application.  One thing that I want to do is provide basic trend functionality.  On google trends I see that they generate a png file on the fly for their trends.  I don't need trends that continuously update so generating some sort of image would work fine.  I know squeak has some libraries to do this sort of thing but does anyone have suggestions for good starting point in VisualWorks?  For our GUI based app we have custom views to handle all of the trending.  Is there any code out there that could take a GrapicsContext and drop it to a jpg for example that could be served up through seaside?  Thanks for any pointers.

Mike

--
Mike Hales
Engineering Manager
KnowledgeScape
www.kscape.com
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Trends and Graphics

Boris Popov-4
Mike Hales wrote:

> I am going to be starting a small seaside project soon to provide a
> limited web interface for our existing VW and Gemstone application.  One
> thing that I want to do is provide basic trend functionality.  On google
> trends I see that they generate a png file on the fly for their trends.  
> I don't need trends that continuously update so generating some sort of
> image would work fine.  I know squeak has some libraries to do this sort
> of thing but does anyone have suggestions for good starting point in
> VisualWorks?  For our GUI based app we have custom views to handle all
> of the trending.  Is there any code out there that could take a
> GrapicsContext and drop it to a jpg for example that could be served up
> through seaside?  Thanks for any pointers.
>
> Mike
>

I'd first generate your graph using graphics context on a pixmap, which
can then be converted to a native image via #asImage, which you could
then save as png/jpg/gif. As far as writers for these formats go, we
wrote a quick and dirty interface to FreeImage which does all the
reading/writing of many image formats for us, I'll have to see on Monday
if I can throw it in the public, its really not rocket science there.

Cheers!

-Boris
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Trends and Graphics

Thomas Koschate-2
In reply to this post by Mike Hales

On 2006-05-27, at 14:43, Mike Hales wrote:

> I know squeak has some libraries to do this sort of thing but does  
> anyone have suggestions for good starting point in VisualWorks?  
> For our GUI based app we have custom views to handle all of the  
> trending.  Is there any code out there that could take a  
> GrapicsContext and drop it to a jpg for example that could be  
> served up through seaside?  Thanks for any pointers.

One of the entries in the 2005 Smalltalk Solutions coding contests  
used VisualWorks and Seaside, and included graphs generated by using  
the VW business graphics package using standard specs.  
Unfortunately, I can't recall who actually did this code, although I  
downloaded it from somewhere and still have it.  The actual code  
looks fairly straightforward, suggesting that it should be easy  
enough to do.
--
============================================================
Thomas Koschate
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside