2
votes

I am using ICEfaces 3.2. I want to know how to change the color of the ICEfaces ace pieChart slices.

My JSF code is as below:

<ace:chart id="chart" value="#{piechartbean.pieData}"
  animated="true"  legend="true"
  widgetVar="pieChart"/>

I want to provide my own color for each slices of the pie chart. My bean code is as below:

public List<SectorSeries> getPieData() {
  SectorSeries series = new SectorSeries();
  series.add("PENDING", map.get("PENDING"));
  series.add("SUBMITTED", map.get("SUBMITTED"));
  series.add("ARCHIVED", map.get("ARCHIVED"));
  series.setShowDataLabels(true);
  series.setSliceMargin(4);
  series.setFill(true);
  pieData.add(series) ;
  return pieData;
}
1
Don't they have seriesColors attribute in <ace:chart like in primefaces (after all they did took primefaces library as is...) primefaces.org/docs/vdl/3.4/primefaces-p/pieChart.htmlDaniel
NO. seriesColors attribute is not there in the tld. I really dont know if there is any other attribute in ace:chart for colorZEE
Can anyone please help :(ZEE
Shame IceFaces docs are broken , res.icesoft.org/docs/v3_latest/ace/tld/ace/chart.html ask on their forum to fix it with a proper page , You might get some usefull info there...Daniel
SectorSeries is a subclass of ChartSeries which has the property String[] seriesColors. This can be used to define an array of CSS color definitions for use by the renderer. This solution i got from Icesoft forum.ZEE

1 Answers

0
votes

SectorSeries is a subclass of ChartSeries which has the property String[] seriesColors. This can be used to define an array of CSS color definitions for use by the renderer. This solution i got from Icesoft forum.