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.

Fri Apr 17, 2015 3:25 am

Hello,

Has your issue been resolved? Could you please give us some feedback at your convenience?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Fri Apr 17, 2015 3:31 pm

Thanks for the follow-up. It works now.

ethahaj
 
Posts: 14
Joined: Thu Mar 26, 2015 3:23 pm

Mon Apr 20, 2015 1:13 am

Hello,

If there are any questions, welcome to get it back to us.

Best Regards,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Mon Apr 27, 2015 4:27 pm

Hi,
I am currently using the below command to initialize the series label values.
chart.Series.SeriesLabel = chart.ChartData("B1", "D1")

Is there a way for me to use some temporary placeholder that can be used to initialize the serieslabel. Does the source data always has to be retrieved from ChartData? Do I need to create a new chart and initialize its chartdata or a better way to do this. I am not sure how I go about initializing IChart for temporary purpose.

I am trying to find out if I can dynamically pass in some string like "legend1", "legend2" etc.

Thanks
Thameez

ethahaj
 
Posts: 14
Joined: Thu Mar 26, 2015 3:23 pm

Tue Apr 28, 2015 10:29 am

Hello,

Thanks for your inquiry.
We are investigating this issue, once there is any process, we will let you know.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Wed Apr 29, 2015 7:10 am

Hello,

After investigation, sorry that there is no way to use some temporary placeholder that can be used to initialize the serieslabel, and the source data always has to retrieved from ChartData.

Best Regards,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Wed Apr 29, 2015 1:46 pm

Hi Betsy,
Thanks for looking into it. I was able to get around the issue by doing the following.

chart.Series.Clear()
cellRange = chart.Series.SeriesLabel.Item(0)
cellRange.Value = uclsSeries.Name

Thameez

ethahaj
 
Posts: 14
Joined: Thu Mar 26, 2015 3:23 pm

Thu Apr 30, 2015 1:45 am

Dear Thameez,

Thanks for sharing.
Please feel free to contact us if you have any question or needs.

Best Regards,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Thu Apr 30, 2015 8:53 pm

Hi,
I am trying to format the font-sizes of primary axis, secondary axis, category axis, and series label values.
I am using the following commands and it crashes.

chart.PrimaryValueAxis.TextProperties.TextRange.FontHeight = 10
chart.SecondaryValueAxis.TextProperties.TextRange.FontHeight = 10
chart.PrimaryCategoryAxis.TextProperties.TextRange.FontHeight = 10

I am not sure how to set the font sizes for the series labels.
Can you please let me know how I can format them.

I have highlighted them in blue in the attached slide.

Thanks
Thameez

ethahaj
 
Posts: 14
Joined: Thu Mar 26, 2015 3:23 pm

Fri May 01, 2015 3:54 am

Hello,

Please try the following code snippet:
Code: Select all
 
chart.PrimaryCategoryAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight = 10;
chart.PrimaryValueAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight =10;
chart.SecondaryCategoryAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight = 10;
chart.SecondaryValueAxis.TextProperties.Paragraphs[0].DefaultCharacterProperties.FontHeight = 10;     

chart.ChartLegend.EntryTextProperties[0].FontHeight = 10;


Best wishes,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Fri May 01, 2015 4:30 pm

Thanks for your response. Using your code I am almost there. The only item left is to format the legends associated with the secondary axis.

When I use the following code it is able to format the legends associated with the primary axis.

For i As Integer = 0 To chart.ChartLegend.EntryTextProperties.Length - 1
chart.ChartLegend.EntryTextProperties(i).FontHeight = 10
Next

Can you please let me know how I can do the same for legends associated with secondary axis (highlighted in blue). I have attached the updated slide.

ethahaj
 
Posts: 14
Joined: Thu Mar 26, 2015 3:23 pm

Fri May 01, 2015 5:47 pm

Another issue I noticed was that the secondary axis was not reflecting different series color. If you have multiple series plotted on the secondary axis all of them are drawn using the same color. Can you please investigate this as well.

Thanks
Thameez

ethahaj
 
Posts: 14
Joined: Thu Mar 26, 2015 3:23 pm

Mon May 04, 2015 2:42 am

Dear Thameez,

Please use the latest version(Spire.Presentation Pack Version:2.2.22) and try the following code to set the font of all legends
and serie's color.

Code: Select all
Dim ppt As New Presentation()
ppt.LoadFromFile("..\..\Format_V2.pptx")
Dim chart As IChart = TryCast(ppt.Slides(0).Shapes(0), IChart)
Dim legend As ChartLegend = chart.ChartLegend
'Set legend's font
For i As Integer = 0 To legend.EntryTextProperties.Count() - 1
   legend.EntryTextProperties(i).FontHeight = 10
Next

'Set serie's color
chart.Series(3).Line.FillType = FillFormatType.Solid
chart.Series(3).Line.SolidFillColor.Color = Color.OrangeRed
chart.Series(3).MarkerFill.Fill.FillType = FillFormatType.Solid
chart.Series(3).MarkerFill.Fill.SolidColor.Color = Color.OrangeRed

Dim output As String = "result.pptx"
ppt.SaveToFile(output, FileFormat.Pptx2007)


Feel free to contact us if you have any problems.

Best wishes,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Tue May 05, 2015 6:19 am

Dear Thameez,

Have all your issues been resolved?
Thanks for your feedback.

Best wishes,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Thu May 07, 2015 1:42 pm

Hi Amy,
Thank you for your assistance. Yes, your suggestions have helped me resolve the issues.
Regards,
Thameez

ethahaj
 
Posts: 14
Joined: Thu Mar 26, 2015 3:23 pm

Return to Spire.Presentation