Hi Support
Ive drawn a line chart and it looks very nice. The x-axis goes from 0 to 20 in steps of 1. However Id like to be able to change each of the x-axis labels.
Im sure this is simple but I cant work out how to do it? Can you explain?
For your information Ive tried
n = 0;
while(n < numberOfPoints)
{
myChart.Axes.Bottom.Labels.Items[n].Text = "my label";
++n;
}
but this doesn't work for n>=0. The collection has zero size.
We are using TeeChart for Net v3 and programming in C#.NET
How Do I Change X-Axis Labels to my own Customized Values?
Re: How Do I Change X-Axis Labels to my own Customized Values?
Hi Dave,
You have an example about it in the feature demo included with the instalaltion. At "All Features\Welcome !\Axes\Labels\Custom labels".
For example:
You have an example about it in the feature demo included with the instalaltion. At "All Features\Welcome !\Axes\Labels\Custom labels".
For example:
Code: Select all
bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues(7);
tChart1.Axes.Bottom.Labels.Items.Clear();
for (int i = 0; i < bar1.Count; i++)
{
if (i % 2 == 0)
tChart1.Axes.Bottom.Labels.Items.Add(bar1.XValues[i], "bar nº" + i.ToString());
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: How Do I Change X-Axis Labels to my own Customized Values?
Thanks Yeray thats helped.