I want to create a dynamic p:lineChart. So i need to create the nested p:chartSeries child elements dynamically. Basically i have the following data that i want to visualize in the chart.
Code: Select all
public class ChartData {
private String time;
private List<Integer> values;
}
Code: Select all
<p:lineChart id="chart" value="#{chartBean.chartData}" var="data" xfield="#{data.time}">
<p:chartSeries label="value" value="#{data.values[0]}" />
</p:lineChart>
Best regards