Suppressing Zero Value in Stacked Bar Chart Using Aspose.Slides for .NET

Hello Team,

I am using Aspose .net slides and am writing to seek your assistance regarding a specific challenge, we have encountered while using Aspose for our data visualization needs.

Currently, when a segment within a stacked bar chart has a value of zero, that particular segment continues to be displayed. For the accuracy of our visualizations and to avoid any confusion, we need the ability to suppress or exclude segments with zero values from being shown on the chart.

Please find the below image for reference,
Screenshot (464).jpg (52.4 KB)

Please find the attached document for the sample code and sample data

Stacked bar chart function with sample data.docx (16.8 KB)

Thank you for considering our request. We look forward to your response and guidance on how to effectively suppress zero value segments in stacked bar charts.

Thanks!

@Rashique,
Thank you for contacting support. I am working on the issue and will get back to you as soon as possible.

@Rashique,
Could you please share a standalone complete code example that reproduces the problem?

Please find the attached code to reproduce the issue,

Screenshot (471).jpg (52.0 KB)

Stacked Bar chart Function.docx (15.0 KB)

I can remove zeros but orders of value get collapsed.

Thank you for considering our request. We look forward to your response and guidance on how to effectively suppress zero value segments in stacked bar charts.

Thanks!

@Rashique,
Thank you for the code example. I will get back to you as soon as possible.

@Rashique,
Unfortunately, I did not find in PowerPoint the possibility of forced hiding of zero values in the chart. If you can create the chart you want in PowerPoint manually, please share a sample presentation. We will do our best to help you to achieve the same result using Aspose.Slides.

Please also note that your code example generates the chart data incorrectly.
chart_data.png (97.9 KB)

Would this attached ppt help?

Suppress Zero.zip (34.1 KB)

@Rashique,
As far as I can see, this is your output presentation file generated with Aspose.Slides, but I asked to send a presentation with the desired look, created in PowerPoint manually. I was not able to achieve your requirements in PowerPoint and I am guessing it is not possible.

I have created the PPT manually by adding values, I just don’t want to show the zero values in the chart.

Please find the attached ppt for reference.

Suppress Zero value.zip (35.0 KB)

Thanks.

@Rashique,
It looks like the zero segments cannot be hidden on the chart (PowerPoint documents do not allow to do this). So it is also not possible to do with Aspose.Slides.