1

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?

polygenelubricants
  • 376,812
  • 128
  • 561
  • 623
Anand Sunderraman
  • 7,900
  • 31
  • 90
  • 150

3 Answers3

1

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Murat Can ALPAY
  • 520
  • 2
  • 17
0

May be you could use the Google Chart API.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Thunder
  • 10,366
  • 25
  • 84
  • 114
0

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
  • 4,367
  • 4
  • 30
  • 28