I would like to output a text at location defineded by x which is a datetime and the bottom axes isdatetime.
How can I get that location?
CalcXPosValue accepts double only.
Thanks in advance
Use CalcXPosValue on Datetime axes
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi malkarra,
You can easily convert a DateTime value to a double using Microsoft .NET Framework's methods as shown here:
You can easily convert a DateTime value to a double using Microsoft .NET Framework's methods as shown here:
Code: Select all
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
int x = line1.CalcXPosValue(Convert.ToDouble(line1.XValues[5]));
int y = line1.CalcYPosValue(line1.YValues[5]);
tChart1.Graphics3D.TextOut(x,y,"My Text");
}
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 |