Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents from any .NET(C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Mon Oct 16, 2017 8:56 pm

I am currently evaluating your software and trying to formatting the data label with no decimal
First try, formatting inside the row:
Code: Select all
     
 for (int r = 0; r < ds_CustomerReport1.Tables[0].Rows.Count; r++)
            {
                ChartDataLabel cdl5 = chart_p5c1.Series[0].DataLabels.Add();
                cdl5.LabelValueVisible = true;
                cdl5.Position = ChartDataLabelPosition.OutsideEnd;
                cdl5.NumberFormat = "0";
            }


then try out side the loop:
Code: Select all
           
chart_p5c1.Series[0].DataLabels.LabelValueVisible = true;
chart_p5c1.PrimaryValueAxis.NumberFormat = "\"$\"#,##0";
 chart_p5c1.PrimaryCategoryAxis.NumberFormat = "Year";


None of this works.
I send the sample to Support@e-iceblue.com.
Thanks.

fmasfar
 
Posts: 7
Joined: Mon Jun 26, 2017 2:58 pm

Tue Oct 17, 2017 2:29 am

Hello,

Thanks for your inquiry.
Please add the code
Code: Select all
cdl5.HasDataSource = false;
into your loop, then set NumberFormat will work.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1031
Joined: Tue Sep 27, 2016 1:06 am

Tue Oct 17, 2017 12:41 pm

it's working.
Thank you Nina.

fmasfar
 
Posts: 7
Joined: Mon Jun 26, 2017 2:58 pm

Wed Oct 18, 2017 2:19 am

Hello,

Thanks for your feedback.
Please feel free to contact us if you need further assistance.
Have a nice day!

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1031
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.Presentation