Hi,
I am trying to generate a lineChart with multiple <p:chartSeries> by a <c:forEach loop.
<p:lineChart id="line" value="#{SearchBean.responseTimeList}" var="graph" xfield="#{graph[0]}" style="chartStyle" styleClass="column11" >
<c:forEach var="series" items="#{BAMSearchBean.responseTimeList}" begin="1" varStatus="idx">
<p:chartSeries label="Event" value="#{series}" ></p:chartSeries>
</c:forEach>
</p:lineChart>
responseTimeList is an arrayList of object[]. For example responseTimeList can have following object[]
0 - Object[] for xField value
1 - Object[] for 1st chartSeries
2 - Object[] for 2nd chartSeries
I can see all values are coming correctly, but chart is not getting rendered due to c:forEach. I have modified BaseChartRenderer.getFieldName(String expressionString) method to work for graph[0] & {series}. Please help me by suggesting how to solve this issue.
Thanks.
Dynamic <p:chartSeries> for a lineChart
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Hi, why dont you convert your responseTimeList array to a list.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 44 guests