views:

420

answers:

4

I have a web application written with JavaServer Faces technology.

The application takes n inputs and provides an output.

I want the following functionality in my application.

I want to have sliders for each of my inputs.

I want the output to be depicted by a graph.

So whenever I change the input values via a slider I want the changed output value also displayed in the graph

So what will be the best way to do this?

+1  A: 

May be you could use the Google Chart API.

Thunder
will give it a shot and get back to you
Anand
okay maybe I can use the google api for the graphs.... but what about the sliders how do i code that ??
Anand
+1  A: 

You need two components. One is the slider component which comes with pretty much every component library. Second one is the chart component I believe comes with the PrimeFaces component library. All JavaServer Faces component libraries support Ajax so you could give it a shot.

MCA
thanks for your suggestion but I am already using the Trinidad and Tobago faces component which does not have a slider. So is there any work around in this case ??
Anand
RichFaces and PrimeFaces both have slider components consider using them.
MCA
But I am not using either of them but infact am using Trinidad and Tobago
Anand
A: 

In one of my projects we had a similar request.

As we where using richfaces we used those components but for the graph drawing we used jGraph, a small 'open source' library.

We chose jGraph as it was the only (not too expensive) library we found that allowed us to layout automatically a graph. (automatic layout is part of a licensed version, not free)

We used the richfaces mediaoutput component to call our backingbean which used jGraph to render a jpg of our graph.

HeDinges
A: 

Note that automatic layout is part of the free distro of JGraph

David