Hello,
I want to judge the fill type of the graph series, but when the graph series fill is set to automatic, the fill type I get is still a solid color fill.
Can you help me, please?
code show as below:
Workbook workbook = new Workbook("test.xlsx");
Worksheet worksheet = workbook.getWorksheets().get(0);
int type = worksheet.getCharts().get(0).getNSeries().get(0).getArea().getFillFormat().getFillType();
System.out.println(type); // 2
@xuerui,
When we open the file using MS-Excel and view the fill options of the chart, we can see that the results obtained by the program are consistent. Please refer to the attachment.result.png (49.5 KB)
@xuerui,
The three circles in your picture represent three series. And each Series has only one point. If you want to obtain the fill type for each series, please refer to the following code:
int type = worksheet.getCharts().get(0).getNSeries().get(0).getArea().getFillFormat().getFillType();
If you want to obtain the fill type of points in each series. Please refer to the following code:
ChartPoint first = worksheet.getCharts().get(0).getNSeries().get(0).getPoints().get(0);
int fillType = first.getArea().getFillFormat().getFillType();
@xuerui
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSJAVA-45373
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@xuerui
All fill types of serieses are solid in the file.
It should be the bug of MS Excel.
Please format one series as red in MS Excel , save the file and open the file with MS Excel again, you will see automatic again.