SilverLight : Show date axis value in annotation
Posted: Fri Jul 24, 2009 7:08 am
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");
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");