Hi,
I have a chart with a DateTimeAxis as the x-axis, and NumericalAxis as the Y-axis.
My aim is to draw a ViewAnnotation off-chart and above a specified DateTime. See the mockup image below for what I'm trying to achieve - annotation is the label above X: "00:00".
Here's my progress:
I've set the annotation's CoordinateUnit to pixels in order to draw it outside of the chart area. Which means I need to convert the DateTime value into a pixel value. I've tried using the ValueToPoint method on the chart, i.e:
annotation.X1 = chart.ValueToPoint(chart.PrimaryAxis, ??? );
But I can't seem to figure out how to convert my datetime to a double value, and OADate doesn't seem to give the correct value when I try using it.
Any help to build on my attempt or to suggest an entirely different solution would be great,
Thanks!