Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Sun Jul 21, 2024 12:11 pm

Hi Team,

Thanks for the support that you are providing.
I was an issue while resizing the Graph(for example : Column Clustered) i.e. when I try to resize only the graph bars are getting resize but Category labels, Data Labels and Legends are not getting resized.

I wanted to know if there is a way to resize all these(Category Labels, Legends, Footer etc..) together?

Thanks in advance!!!

praveenkasani
 
Posts: 14
Joined: Mon Mar 04, 2024 11:21 am

Mon Jul 22, 2024 7:16 am

Hello,

Thanks for your inquiry.
Sorry, the settings you mentioned can only be set separately. Please refer to the code below to set the category label and legend. Regarding the issue with the footer, which part are you referring to? Can you provide us with some screenshots to illustrate? Thank you in advance.
Code: Select all
 //Set category label
 chart.Categories.CategoryLabels = chart.ChartData["A2", "A5"];
 chart.PrimaryCategoryAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.LatinFont = new TextFont("Arial");
 chart.PrimaryCategoryAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight = 22;
 chart.PrimaryCategoryAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.Fill.FillType = FillFormatType.Solid;
 chart.PrimaryCategoryAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.Fill.SolidColor.Color = Color.Red;


 //Change legend font size
 for (int i = 0; i < chart.ChartLegend.EntryTextProperties.Length; i++) {
     chart.ChartLegend.EntryTextProperties[i].FontHeight = 20;
     chart.ChartLegend.EntryTextProperties[i].IsItalic = TriState.True;
 }

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Mon Jul 22, 2024 1:48 pm

Hi William,

Thanks for the reply and the scaling works similar to how the normal PPT works.
Anyways I have another query regarding Chart title i.e. I need to display chart title at the top the slide based on Dynamic text. I have highlighted the chart title in the attached image with Orange color box.

Can you please let me know how to do this?

Thanks in Advance!!!

praveenkasani
 
Posts: 14
Joined: Mon Mar 04, 2024 11:21 am

Tue Jul 23, 2024 5:36 am

Hello,

Thanks for your inquriy.
Sorry, I don't quite understand what you mean by "dynamic text". Does the following code for setting the chart title not work? Also, is there a corresponding setting in Microsoft PowerPoint?
Code: Select all
chart.ChartTitle.TextProperties.Text = "Chart Title";


Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Tue Jul 23, 2024 11:41 am

Hi William,

Thanks for the reply. Apologies I didn't explain the question properly in the previous post. May be the below explanation helps to understand.

Dynamic text means - I have very long Char title which is combination of my data. How can I restrict the text to certain characters and add a tooltip for the remaining title text i.e. when user hovers on the title, tooltip should show the complete chart title.

Thanks in Advance!!!

praveenkasani
 
Posts: 14
Joined: Mon Mar 04, 2024 11:21 am

Wed Jul 24, 2024 2:41 am

Hello,

Thanks for your reply.
Can this feature you mentioned be set in Microsoft PowerPoint? If not, I'm afraid our product cannot implement it because our code follows Microsoft specifications. If Microsoft PowerPoint can implement it, to help us investigate further, can you guide me on how to set it up? Thank you in advance.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 454
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.Presentation