You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by li...@geekbliss.com on 2006/02/06 17:07:27 UTC

Producing graphs within Jetspeed

Hi,
i'm currently trying to create a portlet showing a graph generated from data
held within my database.

If anyone can recommend a way of producing various graphs within Jetspeed2, I'd
appreciate the advice. My current thoughts are to use jsp chart creator.

Regards
Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Producing graphs within Jetspeed

Posted by li...@geekbliss.com.
Thanks for the advice regarding the graphs.

As a quick fix, I thought it might be easy to just call a perl cgi script to
produce my graph, such as the code shown below, but unfortunatly I don't think
this will work within Jetspeed as the setting of the header seems to be
ignored, thus resulting in Jetspeed trying to display the image as text.

I'm sure this could be resolved by having the below code in one file (e.g.
graph.cgi) and calling it from a different cgi file, using the syntax <img
src='graph.cgi'>
I'm having trouble testing this as I'm not sure how to correctly path to the
graph.cgi file which currently resides with my other cgi scripts in the
location  /ApacheJetSpeed2.0/webapps/perl/WEB-INF/

Ideally, I'd like the graph.cgi script to remain in its current location so I
can use Jetspeed to control access to the file.

Any thoughts?

Regards
Dan


#!/usr/bin/perl -w
use strict;

use CGI;
use GD::Graph::pie;

my $cgi = CGI->new();
print $cgi->header( -type => "image/jpeg" );

my @data = ( ["Apache","IIS","Other"], [ 67.2, 21.0, 11.8] );

my $graph = new GD::Graph::pie( 250, 200 );

$graph->set( title       => "Web server Usage, March 2004",
             dclrs       => [ qw( #D6D6FF #CECECE #FFFFFF ) ],
             pie_height  => 32,
             start_angle => 90 );

print $graph->plot(\@data)->jpeg();


>>
>> Hi,
>> i'm currently trying to create a portlet showing a graph generated from data
>> held within my database.
>>
>> If anyone can recommend a way of producing various graphs within Jetspeed2,
> I'd
>> appreciate the advice. My current thoughts are to use jsp chart creator.
>>
>> Regards
>> Dan
>>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Producing graphs within Jetspeed

Posted by Aaron Evans <aa...@yahoo.ca>.
Tommaso <tommaso.nuccio <at> fwctc.com> writes:

> 
> Hi,
> 
> there is something around:
> http://www.jfree.org/jfreechart/index.php
> 
> it is completely free and not too hardto use.
> I will use it in the near future, too.
> 
> Good luck,
>   Tommaso
> 

I know others have looked into using Cewolf (and thus jfreechart under the
hood).  However, I'm wondering if anyone has been successful in this regard in
a J2 environment.

I looked briefly at Cewolf and it looks like it is pretty straight-forward to
do in a servlet/JSP.  However, I think the portlet would be trickier because
there is a cewolf servlet that has to be set up and have a URI pattern map 
to it.

I assume this is for rendering the graphs/charts to images.  I think there would
be a problem here because the requests to the Cewolf servlet will by-pass the
portal and the session/request objects holding the data in the portlet session/
request will not be visible.

This is something I will have to tackle within the next few months, so it would
be great if others could share solutions...

thx,
aaron



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Producing graphs within Jetspeed

Posted by Tommaso <to...@fwctc.com>.
 <lists <at> geekbliss.com> writes:

> 
> Hi,
> i'm currently trying to create a portlet showing a graph generated from data
> held within my database.
> 
> If anyone can recommend a way of producing various graphs within Jetspeed2, 
I'd
> appreciate the advice. My current thoughts are to use jsp chart creator.
> 
> Regards
> Dan
> 


Hi,

there is something around:
http://www.jfree.org/jfreechart/index.php

it is completely free and not too hardto use.
I will use it in the near future, too.

Good luck,
  Tommaso


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


RE: Producing graphs within Jetspeed

Posted by Kevin Shultz <ke...@metnet.navy.mil>.
You may want to do some reading here:


http://www.manageability.org/blog/stuff/open-source-structured-graphics-libr
aries-in-java

Not sure of any proven ones in JetSpeed but these are Java-based and should
be a good starting point.

V/R,

Kevin

-----Original Message-----
From: lists@geekbliss.com [mailto:lists@geekbliss.com]
Sent: Monday, February 06, 2006 8:07 AM
To: 'Jetspeed Users List'
Subject: Producing graphs within Jetspeed


Hi,
i'm currently trying to create a portlet showing a graph generated from data
held within my database.

If anyone can recommend a way of producing various graphs within Jetspeed2,
I'd
appreciate the advice. My current thoughts are to use jsp chart creator.

Regards
Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org