Search code examples
javaswinggwtgxt

Create Graph or chart in java/ gwt?


I have to create a graph or a chart in GWT which look like Chart

P,Y,T,A,R are the organisations and the 10 is the Max limit . For P the value is 5 , For Y value is 7..

Is there any library availabe for this chart .? If not can any tell me the approach to achieve this.??

Thanks


Solution

  • We use JFreeChart (http://www.jfree.org/jfreechart) library on server side successfuly in GWT application. JFreeChart brings us great flexibility to what could be rendered. The only major drawback is that it runs only on server side (JVM). You need special servlet for handling graph generations. On client side you should create e.g. img html element with special url passing either chart parameters or special token (for chart identification) returned in previous RPC (Ajax) call, invoked for chart processing.

    This approach requires more work than using client-side charting library, but brings you possibility to tune up charts in future in the way you need. Please check JFreeChart Web Start Demo with sources -http://www.jfree.org/jfreechart/samples.html. For your use case there is one nice example - Spider Web Chart Demo - which is certainly possible to adopt for your requirements.

    Spider Web Chart Demo 1