Hi Steema Support,
We want to set axis Label Value format using code:- tchart1.Axes.Bottom.Labels.ValueFormat ="#.000E+0";
but it does not show any changes or work expected. We are attaching demo for the same.
Thanks in advance.
Thanks
PlanoResearch
Set Axis Label Value Format
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Set Axis Label Value Format
Hi PlanoResearch,
That's because you are using custom axis labels and you are not setting custom axis labels strings to this desired format, you should set the desired string format in the Double.ToString method, for example:
That's because you are using custom axis labels and you are not setting custom axis labels strings to this desired format, you should set the desired string format in the Double.ToString method, for example:
Code: Select all
tChart1.Axes.Bottom.Labels.Items.Clear();
tChart1.Axes.Bottom.Labels.Items.Add(tChart1.Axes.Bottom.Minimum, tChart1.Axes.Bottom.Minimum.ToString("###0.00"));
double incrBottom = tChart1.Axes.Bottom.Increment;
double labelvalueBottom = tChart1.Axes.Bottom.Minimum + incrBottom; //increment in steps of 500
while ((labelvalueBottom) <= tChart1.Axes.Bottom.Maximum)//tChart1.Axes.Bottom.Minimum ++ incr
{
tChart1.Axes.Bottom.Labels.Items.Add(labelvalueBottom, labelvalueBottom.ToString("###0.00"));
labelvalueBottom += incrBottom;
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Set Axis Label Value Format
Thanks! Steema Support it works successfully!!!