Hide specific Legend entry?

I have a stacked bar chart in an existing PPT file that I use as a template. In the template, I have hidden all the Legend entries except for [Geo Average]. However, once I change the data via Aspose.Slides, the [Case Average] entry reappears in the Legend:



If I use a breakpoint to examine the ChartEx object to see what the Legend.TextProperties contains, it’s basically blank:
  • TextFrameEx legend = ((TextFrameEx) curChart.Legend.TextProperties);
    • legend.Text = ""
    • legend.Paragraphs.Count = 1
    • legend.Paragraphs[0].Text = ""

Where do I access the Legend entries to individually set their visibility/display attributes?

Hi John,


Thanks for inquiring Aspose.Slides.

I have tried to understand the requirement shared by you but in order to further investigate on my end I request you to please share the sample presentation, generated presentation and sample project code reproducing the issue. I also like to share that Aspose.Slides either show all legends or not.

Many Thanks,

I don’t know how much of the project you need me to include, but here are the template file, the export.aspx & .cs files, and the resulting demo.pptx.


Also, you will notice that the demo.pptx slide has the Demo notification in the background/foreground. That too is an issue I am unable to fix. While I am posting this under my jackcroww login here, my company does have a legal copy of Slides. The account here is [oliverwyman]. I just didn’t realize that I was logged in to my jackcroww account when I started this thread.

In order to sort out the licensing issue, would I start a private message thread in this forum under that other login?

Thanks,

John

Hi John,

I have observe the presentation files and shared code snippet from you. Unfortunately, I am unable to use the code snippet shared by you as it is calling some custom data on your end. In order to reproduce the issue on my end, I request you to please share the sample application that I can use on my end for reproducing the issue. I also like to share that you can use the LegendEx.Width and LegendEx.Height properties to set the legend width and height and hide the other legends using this property.

For, issue of demo or evaluation version message appearing a watermark on slide, I like to share that you need call the license instance of Aspose.Slides by following these guide lines . If you are already calling the license and still getting watermark then I suggest you to please verify your subscription that whether it has been expired or not. Please share, if I may help you further in this regard.

Many Thanks,