-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I'm creating a dashboard application which requires me to allow user to change the chart type to any other available chart type and reload the org.zkoss.chart.Charts <charts>.
Charts charts = (Charts) dashboardBuilderCanvas.getFellow(chartsId);
I can get the Charts, but when I want to change the type or the model from Column chart to Pie Chart:
charts.setType(Charts.PIE);
I get the following error: Unsupported model type [org.zkoss.chart.model.DefaultCategoryModel@5665ad96] on that line.
I tried to do this:
PieModel model = new
DefaultPieModel();
charts.setModel(model);
charts.setType(Charts.PIE);
But I get the same error:
java.lang.IllegalArgumentException: Unsupported model type [org.zkoss.chart.model.DefaultCategoryModel@5e92429a]
at org.zkoss.chart.impl.PiePlotImpl.drawPlot(PiePlotImpl.java:33)
at org.zkoss.chart.Charts.doSmartDraw(Charts.java:2197)
at org.zkoss.chart.Charts.smartDrawChart(Charts.java:1702)
at org.zkoss.chart.Charts.setType(Charts.java:662)
How can I resolve this? Thanks.
Asked: 2015-04-21 07:58:11 +0800
Seen: 34 times
Last updated: Jun 05 '15