Free Support Forum - aspose.com

Disable the titles - Aspose Migration

Hi,


We are currently migrating to aspose cells 7.x java.

Issue 1
Can you please tell me how to disable the axisTitle/chart title. I was previously using setText("") for this. But in the new version this creates a blank title. Is there any such method to achieve this functionality.

Issue 2
There is another issue that I am facing now. I have a chart which contains multiple series. The first series is a column series and the rest are line. The column series is plotted on the secondary axis.

After migrating, the issue i am facing is, this column series is getting plotted on the secondary axis but it is originating from the top as opposed to bottom. When i go to format the data series, i see that the plot is secondary axis. If i click om primary and then again click on secondary, the series is now originating from the bottom.

Attached the excel file for the same.

Thanks!!

… Continuation to above

Issue 3
This one was working for me before the upgrade.

I have a template which has a cell whose background is no fill. Previously when I was reading the cell, I was getting the RGB values as 255, 255, 255. Now i am getting as 0, 0, 0.

Workbook workbook = new Workbook(resourceAsStream);
Worksheet worksheet = workbook.getWorksheets().get(0);
Cell cell = worksheet.getCells().get(0,0);
Color foregroundColor = cell.getStyle().getForegroundColor();
System.out.println("Red : " + foregroundColor.getR() +
", Green : " + foregroundColor.getG() +
", Blue : " +foregroundColor.getB());

Now since in the new version these are byte datatype i was expecting values -1, -1, -1.

Please let me know how to resolve this.

Thanks!!

Issue 1

Hi,

For your first problem, I found, you need to set title text as null. Please see the following code, source and output file.

Java


String path = “F:\Shak-Data-RW\Downloads\Source.xlsx”;


Workbook workbook = new Workbook(path);


Worksheet worksheet = workbook.getWorksheets().get(0);


Chart ch = worksheet.getCharts().get(0);


ch.getTitle().setText(null);


workbook.save(path + “.out.xlsx”);

Issue 2
Please provide us your complete code and screenshots explaining the problem. Please provide us your expected output file also. And if you are using some source/input file then, please also attach it. We will look into it and help you asap.

Issue 3

Hi,

I think, that’s a right behavior, because when cell is not filled, then its background color is white.

That is correct. But I am getting values as 0, 0, 0 when there is no fill. I should get values corresponding to white i.e. -1, -1, -1. 0, 0 , 0 corresponds to black. Why should I get the background color as black when there is no fill?


Thanks!!

please refer to below post for the details. I have marked that post private as some attachments contain client specific material.


http://www.aspose.com/community/forums/336701/column-chart-on-secondary-axis/showthread.aspx#336701
Thanks
Hi,

For the issue 2 of secondary axis (and your new thread at
chart.getSecondValueAxis().setPlotOrderReversed(true);


For the issue 3 of color of cell, please check Style.getPattern() at first. If the pattern value is BackgroundType.NONE, then the cell has no fill and the color returned by the style object is meaningless.

Issue 2

Setting the plotOrderReversed to true reversen the axis scales(tick labels). We won’t like it, will ya?