Hi, My problem is that I can't get labels from bottom ax.
I am programing in ASP.NET using C# language.
Here is code that i have problem with
private TeeChart.TChartClass tChart2 = new TeeChart.TChartClass();
protected void Page_Load(object sender, EventArgs e)
{
tChart2.AddSeries(TeeChart.ESeriesClass.scBar);
tChart2.Series(0).Add(10, "first", 0);
tChart2.Series(0).Add(30, "second", 0);
tChart2.Series(0).Add(20, "third", 0);
//next column causes problem
Label1.Text = tChart2.Axis.Bottom.Labels.get_Item(1).Text
tChart2.Export.asNative.SaveToFile("D:\\Data\\graf.txt", true);
}
Could anyone help me, pls.
problem with getting labels from ax
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi zizou5,
This only works if you are using custom labels. You can find a custom labels example at All Features\Welcome !\Axes\Labels\Custom labels in the features demo, available at TeeChart's program group.
If you don't use custom labels you could use GetAxisLabel event, for example:
This only works if you are using custom labels. You can find a custom labels example at All Features\Welcome !\Axes\Labels\Custom labels in the features demo, available at TeeChart's program group.
If you don't use custom labels you could use GetAxisLabel event, for example:
Code: Select all
void tChart1_GetAxisLabel(object sender, Steema.TeeChart.GetAxisLabelEventArgs e)
{
if ((sender == tChart1.Axes.Bottom) && (e.ValueIndex==1))
{
this.Text = e.LabelText;
}
}
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 |