• Post Reply Bookmark Topic Watch Topic
  • New Topic

Create multiple line charts in a single JSF frame using JFreechart

 
Son Ho
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to DYNAMICALLY create multiple line charts in a single JSF(JavaServer Faces) frame using JFreechart?

Currently, I am able to create multiple line charts STATICALLY in a single JSF frame using JFreechart with the following JSF tags in the index.xhtml:

<p> image 1:</p>
<corejsf:chart width="500" height="500" title="Chart 1"
names="#{planets.names}" values="#{planets.values}"/>


<p> image2:</p>
<corejsf:chart width="500" height="500" title="Chart 2"
names="#{planets.name}" values="#{planets.value}"/>

Different attributes, names/name (String[]) and values/value(double[]), were used to create multiple line charts in a single JSF frame. Manually creating additional attribute(s) for additional line charts is not good.

Any help would be appreciated.

Thanks,

sonh
 
Son Ho
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it out using ui:repeat tag.

Son Ho
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!