This question is locked. New answers and comments are not allowed.
I have a line chart consisting of two points that is being graphed incorrectly when one point lies outside of the visible area of the chart. This occurs when I have the both axis' AutoRange properties set to False and I am defining my own MinValue and MaxValues. This was tested on Q2 2012 SP2 for Silverlight 5.
In the function below, both DataSeries represent the line y = 1 - x.
When the function parameter useAutoRange = True, both lines are graphed correctly (see attached autorangetrue.png). Note that since the points of both DataSeries are derived from the same equation, the lines overlap (the red line is very short in the upper left part of the chart).
When the function parameter useAutoRange = False, the first line (blue) is NOT graphed correctly (see attached autorangefalse.png). Note that the lines do not overlap anymore.
In the function below, both DataSeries represent the line y = 1 - x.
When the function parameter useAutoRange = True, both lines are graphed correctly (see attached autorangetrue.png). Note that since the points of both DataSeries are derived from the same equation, the lines overlap (the red line is very short in the upper left part of the chart).
When the function parameter useAutoRange = False, the first line (blue) is NOT graphed correctly (see attached autorangefalse.png). Note that the lines do not overlap anymore.
Public Shared Function GetChartWithBug(useAutoRange As Boolean) As RadChart Dim c As New RadChart If Not useAutoRange Then Dim xAxis As Axis = c.DefaultView.ChartArea.AxisX xAxis.AutoRange = False xAxis.MinValue = 0 xAxis.MaxValue = 50 xAxis.Step = 10 Dim yAxis As Axis = c.DefaultView.ChartArea.AxisY yAxis.AutoRange = False yAxis.MinValue = 0 yAxis.MaxValue = 1 End If Dim ds As DataSeries ds = New DataSeries ds.Add(New DataPoint(0, 1)) ds.Add(New DataPoint(50, -49)) c.DefaultView.ChartArea.DataSeries.Add(ds) ds = New DataSeries ds.Add(New DataPoint(0, 1)) ds.Add(New DataPoint(1, 0)) c.DefaultView.ChartArea.DataSeries.Add(ds) For Each ds1 As DataSeries In c.DefaultView.ChartArea.DataSeries Dim lsd As New LineSeriesDefinition lsd.ShowItemLabels = False lsd.ShowPointMarks = False ds1.Definition = lsd Next Return c End Function