Hi,
Our users have discovered that the X values of data points in line series charts are not always correct. See attached picture of a simple plot of 7 data points. The labels are correct, but notice that the points (2,2), (5,4) and (6,6) are not in the correct position on the X axis.
I hope you agree that incorrectly-plotted data is a serious issue - if this is a bug please fix urgently. Apologies if we are doing something wrong in the chart setup. The chart was created using the following simple XAML:
And the following code behind:
It seems that there is difficulty whenever a data point's X value is less than the previous data point's X value. I even wondered whether the line is able to go "backwards" at all - we have managed to do this, but with interesting results (e.g. the same position in the graph being labelled twice!).
Regards
Ed
Our users have discovered that the X values of data points in line series charts are not always correct. See attached picture of a simple plot of 7 data points. The labels are correct, but notice that the points (2,2), (5,4) and (6,6) are not in the correct position on the X axis.
I hope you agree that incorrectly-plotted data is a serious issue - if this is a bug please fix urgently. Apologies if we are doing something wrong in the chart setup. The chart was created using the following simple XAML:
<
telerik:RadChart
Height
=
"480"
HorizontalAlignment
=
"Left"
Name
=
"chart"
VerticalAlignment
=
"Top"
Width
=
"640"
/>
And the following code behind:
public
MainPage()
{
InitializeComponent();
chart.SeriesMappings.Add(CreateSeriesMapping());
chart.ItemsSource = CreateSeries();
chart.DefaultView.ChartArea.AxisX.MajorGridLinesVisibility = Visibility.Visible;
chart.DefaultView.ChartArea.AxisX.MinorGridLinesVisibility = Visibility.Visible;
chart.DefaultView.ChartArea.AxisY.MajorGridLinesVisibility = Visibility.Visible;
chart.DefaultView.ChartArea.AxisY.MinorGridLinesVisibility = Visibility.Visible;
}
private
SeriesMapping CreateSeriesMapping()
{
SeriesMapping seriesMapping =
new
SeriesMapping();
LineSeriesDefinition lineSeriesDefinition =
new
LineSeriesDefinition();
lineSeriesDefinition.ItemLabelFormat =
"#X, #Y"
;
seriesMapping.SeriesDefinition = lineSeriesDefinition;
seriesMapping.ItemMappings.Add(
new
ItemMapping(
"Key"
, DataPointMember.XValue));
seriesMapping.ItemMappings.Add(
new
ItemMapping(
"Value"
, DataPointMember.YValue));
return
seriesMapping;
}
private
List<KeyValuePair<
int
,
int
>> CreateSeries()
{
List<KeyValuePair<
int
,
int
>> series =
new
List<KeyValuePair<
int
,
int
>>();
series.Add(
new
KeyValuePair<
int
,
int
>(0, 1));
series.Add(
new
KeyValuePair<
int
,
int
>(2, 2));
series.Add(
new
KeyValuePair<
int
,
int
>(1, 3));
series.Add(
new
KeyValuePair<
int
,
int
>(5, 4));
series.Add(
new
KeyValuePair<
int
,
int
>(3, 5));
series.Add(
new
KeyValuePair<
int
,
int
>(6, 6));
series.Add(
new
KeyValuePair<
int
,
int
>(4, 7));
return
series;
}
It seems that there is difficulty whenever a data point's X value is less than the previous data point's X value. I even wondered whether the line is able to go "backwards" at all - we have managed to do this, but with interesting results (e.g. the same position in the graph being labelled twice!).
Regards
Ed