Free Support Forum - aspose.com

Set range not working

Hi,

I am using SetRange to modify the data supplied for chart.

Please find attached the source and the output.
Below is the code i am using
chart.ChartData.SetRange(“Sheet1!A1:G6”);

Please help me understand why this unexpected behavior.

Thanks.

Set Range Not working.zip (82.8 KB)

As per my observation it is resizing the range correctly but on resizing, the series loses its properties such as format, series charttype etc.

That shouldn’t be the case as we are just resizing the chart data and it works fine if we do it manually, resizing the chart data in the excel workbook.

@siddhanntarora,

I have observed your comments. Can you please share working sample project to reproduce issue so that we may help you out in this issue. Also please share environment details along with Aspose.Slides version.

@Adnan.Ahmad,

I have already updated the slides (source and output) attached in my post, via code i am just resizing the slide using the below

chart.ChartData.SetRange(“Sheet1!A1:G6”);

I am using the 17.2 version and currently using trial version, as we are still exploring if aspose caters our requirements.

Set Range Not working.zip (82.8 KB)

@siddhanntarora,

I have worked with the presentation file shared by you and have been able to observe the issue specified. An issue with ID SLIDESNET-39675 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.

@siddhanntarora,

I like to inform that we are investigating issue in details and we need some information from you. Can you please provide desire result. Actually SetRange() method actually clears all series, categories and its data. After that SetRange() builds chart data from scratch based on cell range. So if you expects that already existing data will be extended with new cells it is wrong way to do it, chart will be rebuild from scratch.

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