permaculture playing cards*
The moose likes JSF and the fly likes needing tips for developing a line chart that takes in data points to generate chart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "needing tips for developing a line chart that takes in data points to generate chart" Watch "needing tips for developing a line chart that takes in data points to generate chart" New topic
Author

needing tips for developing a line chart that takes in data points to generate chart

Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

The chart will have time for the x axis and a value for the y axis.

I'm needing to generate a line chart over time using a collection of data points.

Ideally the data points will appear as dots along the line that you can hover over and see the values of. But that will be in the enhanced phase, for now I just want to get a line chart to show up after feeding in some data points.

Does richfaces have a tag that i should look into for something like this? Or any other tips would be appreciated.

edit:
Im also needing my site to import a google map, and then be able to read my projects and from that generate points along the map with web channels going between the points. I know richfaces has the gmap tag but Im not sure if this is what i should be focusing on or not so any help with this will be appreciated too


True wisdom is in knowing you know nothing - Socrates
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61457
    
  67

Matt Kohanek wrote:Does richfaces have a tag that i should look into for something like this? Or any other tips would be appreciated.

This leads me to believe that you are using JSF. If so, please be sure to post your questions in the JSF forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42374
    
  64
One way of embedding charts in web apps is to use the cewolf tag library (which uses JFreeChart to create chart images). See the link in my signature for more information.


Ping & DNS - my free Android networking tools app
Joachim Skeie
Greenhorn

Joined: Jun 19, 2009
Posts: 8
Matt Kohanek wrote:
I'm needing to generate a line chart over time using a collection of data points.
...
Does richfaces have a tag that i should look into for something like this? Or any other tips would be appreciated.


JSFlot is a JSF Chart library that is compatible with RichFaces. It can draw in-browser interactive charts using JavaScript. Most modern browsers are supported. JSFlot also has AJAX Functionality embedded so that the chart can be updated via drag-and-drop (Drag the chart to the right or left to move the timeline (X-Axis)).

JSFlot is Open Source and released via Google Code. JSFlot Google Code Site under the MIT license.
There is also a Live Demonstration of JSFlot here: JSFlot Live Demo

Some example charts generated with JSFlot:



JSFlot - Open Source JSF Chart library for drawing in-browser interactive charts.
Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

Joachim,
Although this portion of the project is now being handled by another member of the team, I went ahead and sent this to him, because this is exactly what we were looking for.
Thanks for the reply and Im sure Ill be using this library in the future for my own projects.
Joachim Skeie
Greenhorn

Joined: Jun 19, 2009
Posts: 8
Thank you Matt. Glad it fits your needs. I'm currently working on making JSFlot more interactive with overlays and the possibiity to click and select data points, chart zooming, etc. In the end it should make for a rather complete charting library.

Matt Kohanek wrote:Joachim,
Although this portion of the project is now being handled by another member of the team, I went ahead and sent this to him, because this is exactly what we were looking for.
Thanks for the reply and Im sure Ill be using this library in the future for my own projects.
Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

Got chart working. jsflot is great, I was able to convert my xml into the desired chart in less than 2 hours
Joachim Skeie
Greenhorn

Joined: Jun 19, 2009
Posts: 8
Matt Kohanek wrote:Got chart working. jsflot is great, I was able to convert my xml into the desired chart in less than 2 hours


I am glad you like it! There are a few more chart types available in the upcoming 0.4.0 release as well ;)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: needing tips for developing a line chart that takes in data points to generate chart