Hi there… I have an excel file with existing chart with 3 columns, the problem is that i try to change a color column of existing chart by using aspose methods, but it’s not working i have tested all possible method but i cant change the color. can anyone help me?
Sorry this is my code:
public void setConditionalFormat(Workbook workbook){
Worksheet worksheet = workbook.getWorksheets().get("Report");
Chart cumplCementoChart = worksheet.getCharts().get("Chart 2");
//cumplCementoChart.getChartShape().
SeriesCollection series = cumplCementoChart.getNSeries();
//cumplCementoChart.getChartDataTable().set
//SeriesCollection series = cumplCementoChart.getgetNSeries();
Series s2 = series.get(0);
//Color color = new Color();
s2.getArea().setBackgroundColor(Color.getDarkGray());
Series s1 = series.get(1);
s1.getArea().setBackgroundColor(Color.getBeige());
Iterator it = series.iterator();
//System.out.println(series.getCategoryData());
while(it.hasNext()){
Series s = (Series) it.next();
s.setMarkerBackgroundColor(Color.getRed());
s.getArea().setBackgroundColor(Color.getRed());
Style style = workbook.createStyle();
style.setBackgroundColor(Color.getRosyBrown());
//s.getMarker().get(0).setStyle(style);
System.out.println(s.getName());
System.out.println(s.getValues());
}
}