ChartData SetRange on a Pivot Table

Hello, I am having some trouble with updating a chart with a newly updated pivot table. I can get the pivot table to update properly, but I am having trouble using ChartData.SetRange on the pivot table. If I SetRange to just the data in the pivot table, then my series labels and horizontal axis are not properly defined. Is there any way to do something like ChartData.SetRange(“Sheet1!Main Table”)?

@bother7,

I have observed your requirements and request you to please provide the source presentation, generated presentation, desired output presentation and working sample project reproducing the issue on your end. Please share the requested information so that I may proceed further to help you out.

I have tried to chop it down into something manageable, please let me know if there needs to be further clarification.

pivotNoRefresh - initial file, without an updated pivottable
afterPivotRefreshAndSetRange - after aspose pivot table refreshing and chartdata.setrange
desiredOutput - what afterPivotRefreshAndSetRange should look like. This is how the file looks after opening the excel data for the chart and the chart refreshing in powerpoint and excel

AsposeRefreshPivot.zip (125.5 KB)

@bother7,

We have investigated issue on our end. I regret to inform that your sample code can not be executed. For example, we did not find the method definition for “GenerateQueryData()”. Can you please share complete working sample project so that we may investigate further to help you out.

@Adnan.Ahmad,

Sorry about that. I have created a sample visual studio project and it should be working now. Please let me know if there is anything else I can provide.

AsposeSetRange.zip (592.0 KB)

@bother7,

We are verifying the issue on our end and will get back to you with feedback as soon as possible.

@bother7,

We have investigated the issue on our end and an issue with ID SLIDESNET-40613 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 notified once the issue will be fixed.

@mudassir.fayyaz,

Great! Thank you for your help.

Hello. Our company is are currently evaluating Aspose Slides and have run into what seems to be the same issue with updating a pivot table chart/labels. It seems the labels are not correctly updated when we refresh the charts. Is there any suggested workaround or do we need to go in and refresh these labels manually?

@cposada,

I have verified the issue status from our issue tracking system and regret to share that at present the issue is unresolved. It has been recently added in our issue tracking system and is pending for investigation. I request for your patience and we will share good news with you soon.

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

@cposada,

I like to suggest you to please try using latest Aspose.Slides for .NET 18.11 on your end and following sample code for setting range.

string range = “Chart!A2:C3”;
chart.ChartData.SetRange(range);