Page 1 of 1
Set Axis Label Value Format
Posted: Thu Aug 27, 2015 10:13 am
by 9526439
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.
- ManageAxis.rar
- Demo file for Set Axis Label Value Format
- (56.61 KiB) Downloaded 886 times
Thanks
PlanoResearch
Re: Set Axis Label Value Format
Posted: Thu Aug 27, 2015 10:40 am
by narcis
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:
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;
}
Re: Set Axis Label Value Format
Posted: Fri Aug 28, 2015 12:33 pm
by 9526439
Thanks! Steema Support it works successfully!!!