问题
How can I draw dynamic graphs in web pages in JSF ? People have suggested Google Chart Api
I want something that can work offline
回答1:
PrimeFaces have wonderful graph components. You can give them a try.
Exadel Fiji also has nice graph components.
MyFaces Trinidad is also an option (as indicated by the OP)
回答2:
Hey I found an answer to my question after scouring the net. Apache myFaces has a tr:chart component that solves my problem :)
回答3:
if you use JSF 2, you can look at flot4jsf2 project. This is JSF2 component for drawing charts, it uses javascript flot library.
回答4:
We were going through the same issue and ended up using JQPlot. It is extensive, JQuery based and so far so good.
http://www.jqplot.com/
回答5:
how about the new Canvas API? may be too bleeding edge to be counted on but it is functional in Chrome and Firefox, and looks to have a lot of potential. Its API reminds of Quartz / OpenGL (but a lot simpler) which makes programatic drawing pretty easy.
回答6:
Richfaces provides a component to draw 2D graphics. http://livedemo.exadel.com/richfaces-demo/richfaces/paint2D.jsf
回答7:
There is a Highcharts wrapper :
the demo is here : http://showcase-jsfcharts.rhcloud.com/
回答8:
I have used jfreechart to draw 3d and 2d Chart at run time. I am using that graph on my pdf file as a report. I will suggest you to use this jfreechart api, I have attached some link for you please check it , Click here:
- JFreeChart - An Introduction
- Create area chart in JSP page using JFreeChart
Second link is a example of jsp page with graph.
来源:https://stackoverflow.com/questions/2040296/drawing-graphs-charts-in-jsf