Some question about chart with aspose.cell

Hi,


I`m looking a way to set some property for chart with aspose cell in c#
1) Height scale Percentage in chart area (in excell : Format Chart area - Size- Scale Height )
2) to set Legend overlapping chart (in excell : Format Legend - Option - unchecked legend without overlapping the chart)
3) set Char area don’t move or size with cell (in excell : Format Chart area - Property- check don’t move or size with cell)

thank

Hi Guillaume,

Thanks for your posting and using Aspose.Cells.

For 1), please use Chart.ChartObject.HeightScale property.

For 2), it is not currently available, we have logged a New Feature request in our database to support this legend option.

This issue has been logged as

  • CELLSNET-42923 - Checking or unchecking the legend option "Show the legend without overlapping the option"

For 3), please use Chart.ChartObject.Placement property.

Here is a sample code for your reference. I have attached the source Excel file used in this code and output Excel file generated by it for you to look over.

C#

Workbook workbook = new Workbook(“source.xlsx”);


Worksheet worksheet = workbook.Worksheets[0];


Chart chart = worksheet.Charts[0];


//Set the chart placement to “Don’t move and size with cells”

chart.ChartObject.Placement = PlacementType.FreeFloating;


//Set the scale height to 90 percent

chart.ChartObject.HeightScale = 90;


workbook.Save(“output.xlsx”);

thank


Hi,

Please try our latest version/fix: Aspose.Cells for .NET v8.2.0.1 (attached).

We have fixed your issue now.

Please try Legend.IsOverLay property.

Let us know your feedback.

Thank you.

Congratulation. You are quick to resolve issues.

Hi,


Thanks for your feedback.

Good to know that your issue is resolved by the new fix, we have closed your ticket now. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.

I think there are problem with this release.the value type are not correctly handle now

for exemple:

int? _row;

_row =15;

sheet.Cells[0, 0].PutValue(_row)Cells[0, 0].PutValue(_row);

but the result is

sheet.Cells[0, 0]_worksheetData.Cells[0, 0] ={Aspose.Cells.Cell [ A1; ValueType : IsNumeric; Value : 15 ]}

sheetData.Cells[0, 0].Value=15.0 with ab double object

Hi,


I have tested your scenario/ case a bit. I could not find any issue retrieving Cell’s type. Could you provide us your sample code (runnable) to reproduce the issue on our end, we will check it soon. Also attach your template file if you have any.

Thank you.

unfortunatly it's part of a large code.

the code breack at

_row = (int?)_worksheetData.Cells[0, 0].Value;with my old dll 7.7.2.0 there is no those problems.

try to cast

Hi,

Thanks for using Aspose.Cells.

The Cell.Type is “IsNumeric” for both int and double values, so it is not safe to cast cell value to int or double directly. From 8.0.0, we changed the data model for cells and most numeric values be kept as double in memory.

For your case, if you are sure that you should get int value from the cell, please use Cell.IntValue instead of (int)Cell.Value.

I will not said I appreciate this change in 8.0.0

I will have to go to all the code to made change.

Unfortunatly I will not be able to use your fix before months.

Hi Guillaume,

Thanks for your posting and using Aspose.Cells.

The improvements that brought this change in newer versions were inevitable, we were to improve the performance and memory consumption of Aspose.Cells, so it is for users betterment.

We are sorry for inconvenience caused to you. Hopefully, you will be able to update your code to use latest version in short time. Let us know if you face any issue, we will be glad to look into it and help you further.

I understand your purpose but there is a lack of information about those big change between version

Hi Guillaume,

Thanks for your posting and using Aspose.Cells.

Please check the following documentation section that lists down all Public API Changes between the versions, it may be helpful for you.


The issues you have found earlier (filed as CELLSNET-42923) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.