The XIntercept property of the Custom Lines expects a double that represents the position of the custom line (as an index) relative to the series datapoints. That is if you have a Line with 10 datapoints and you set XIntercept to 7 - the custom line will be placed where the 7th datapoint is.
One way to achieve your goal is to use a logic (marked in yellow in the code below) that determines where (at which index) you want to place your custom line.
This can be done as follows:
private void PlotArea_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
var plotAreaPanel = sender as ClipPanel;
var position = e.GetPosition(plotAreaPanel);
var x = RadChart1.DefaultView.ChartArea.AxisX.ConvertPhysicalUnitsToData(position.X);
var y = RadChart1.DefaultView.ChartArea.AxisY.ConvertPhysicalUnitsToData(position.Y);
(this.DataContext as ViewModel).X = x;
(this.DataContext as ViewModel).Y = y;
DataSeries series = (DataSeries)(this.RadChart1.DefaultView.ChartArea.Items);
var dataPoint = series.Where(myX => myX == series[(int)x]).SingleOrDefault();
(this.DataContext as ViewModel).XCat = DateTime.Parse(dataPoint.XCategory);
You may find a sample project where the approach is demonstrated.
I hope this helps.
All the best,
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>