Drawing a dynamic graph

1.4k views Asked by At

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?

3

There are 3 answers

2
Thunder On

May be you could use the Google Chart API.

3
Murat Can ALPAY On

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.

0
HeDinges On

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.