2

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;
}
Donato Szilagyi
  • 4,279
  • 4
  • 36
  • 53
ZEE
  • 381
  • 1
  • 6
  • 20
  • Don't they have `seriesColors` attribute in ` – Daniel Jan 10 '13 at 09:23
  • NO. seriesColors attribute is not there in the tld. I really dont know if there is any other attribute in ace:chart for color – ZEE Jan 10 '13 at 10:23
  • Can anyone please help :( – ZEE Jan 11 '13 at 15:24
  • Shame IceFaces docs are broken , http://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 Jan 11 '13 at 18:21
  • 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 Jan 13 '13 at 06:41

1 Answers1

0

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
  • 381
  • 1
  • 6
  • 20