I have used Gchart to display data in chart form. For now the chart is static. I need to make the chart dynamic as the chart values may change time and again. My Code is like this:
dynamicChartObj = new GChartModelBuilder().setChartType(GChartType.PIE).build();
dynamicChartObj = new GChartModelBuilder()
.setChartType(GChartType.PIE)
.addColumns("Topping", "Slices")
.addRow("A", 12)
.addRow("B", 20)
.addRow("C", 39)
.addRow("D", 45)
.build();
<div id="savChart">
<pe:gChart value="#{dashboardMB.dynamicChartObj}" width="400" height="400"
title="Quanity Wise">
</pe:gChart>
</div>
I need to add rows dynamically. How can i do this?