I’m using this code to generate a bar chart whose bars will be green if the value is greater than 100 and red if less than. It’s working fine with excel.But the problem arises when it’s getting converted to PDF or PPTX. The bars whose value is less than 100 are also colored green in PDF and PPTX. Kindly do reply ASAP.
sheet.getCharts().get(0).getValueAxis().setCrossAt(100.0);
sheet.getCharts().get(0).getNSeries().get(0).getArea().setForegroundColor(Color.fromArgb(0, 176, 80));
sheet.getCharts().get(0).getNSeries().get(0).getArea().setBackgroundColor(Color.fromArgb(255, 0, 0));
sheet.getCharts().get(0).getNSeries().get(0).getBorder().setVisible(false);
sheet.getCharts().get(0).getNSeries().get(0).getArea().setInvertIfNegative(true);