hi,
I am plotting datetime(time of bid) = x axis , against bid price in Y axis .
when the user moves the cursor i want to show the value of x,y in a annotation that follows the cursor , i managed to get the annotation to follow the cursor as seen in the attached jpg . but am not able to see the correct value of date X axis in annotation , it shows up as double instead of date . is there some calculate function to calc the date from that double value .
sample code
----------------------------
anon.Left = e.x;
anon.Top = e.y ;
anon.Width = 200;
anon.Height = 30;
anon.Text = "X=" + DemoChart.Axes.Bottom.SomeCalcXPosValuefunction(e.XValue or e.x).ToString() + "; Y=" + e.YValue.ToString("#.000");
SilverLight : Show date axis value in annotation
-
- Newbie
- Posts: 46
- Joined: Wed Jan 28, 2009 12:00 am
SilverLight : Show date axis value in annotation
- Attachments
-
- FxSample.JPG (19.17 KiB) Viewed 8485 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: SilverLight : Show date axis value in annotation
Hi Priya,
Yes, you can use FromOADate method:
Yes, you can use FromOADate method:
Code: Select all
DateTime dt = DateTime.FromOADate(x);
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 |
-
- Newbie
- Posts: 46
- Joined: Wed Jan 28, 2009 12:00 am
Re: SilverLight : Show date axis value in annotation
Thanks Narcis , works fine .