Ves,
Thanks for the reply. I have created an object called ChartDatum with the following structure.
ChartDatum
public DateTime Period
public int? ForecastValue
public int? PerviousForecastValue
public int? SupplierForecastValue
I then created an ObservableCollection<ChartDatum> ChartData which I have bound to ItemsSource and bound the properties as follows:
<
telerik:RadChart.SeriesMappings
>
<
telerik:SeriesMapping
LegendLabel
=
"{Binding PeriodValue, StringFormat='Supplier Forecast - \{0:y\}'}"
>
<
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:SplineSeriesDefinition
/>
</
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:ItemMapping
DataPointMember
=
"YValue"
FieldName
=
"SupplierForecastValue"
/>
<
telerik:ItemMapping
DataPointMember
=
"XValue"
FieldName
=
"Period"
/>
</
telerik:SeriesMapping
>
<!---->
<
telerik:SeriesMapping
LegendLabel
=
"{Binding PeriodValue, StringFormat='Forecast - \{0:y\}'}"
>
<
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:SplineSeriesDefinition
/>
</
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:ItemMapping
DataPointMember
=
"YValue"
FieldName
=
"ForecastValue"
/>
<
telerik:ItemMapping
DataPointMember
=
"XValue"
FieldName
=
"Period"
/>
</
telerik:SeriesMapping
>
<!---->
<
telerik:SeriesMapping
LegendLabel
=
"{Binding PreviousPeriodValue, StringFormat='Previous Forecast - \{0:y\}'}"
>
<
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:SplineSeriesDefinition
/>
</
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:SeriesMapping.ItemMappings
>
<
telerik:ItemMapping
DataPointMember
=
"YValue"
FieldName
=
"PreviousForecastValue"
/>
<
telerik:ItemMapping
DataPointMember
=
"XValue"
FieldName
=
"Period"
/>
</
telerik:SeriesMapping.ItemMappings
>
</
telerik:SeriesMapping
>
</
telerik:RadChart.SeriesMappings
>
My XAxis is defined as follows:
But I am seeing a few anomolies.
1.
SOME of the labels are repeating. MAR-2011 MAR-2011 APR-2011 APR-2011 MAY-2011 JUN-2011 JUN-2011 JUL-2011 AUG-2011 AUG-2011 but the data is fine for the repeating months, it only shows once even in the repeating months. This is due to the range being plotted by the chart, which I don't want. When I take the format off I get Tuesday March 1, 2011 then Sunday March 20, 2011 but I only want the DateTimes that actually exist in my data to appear. There is only ever data for the first day of each month.
2. The previous forecast item series never shows up. The only difference of note is that it has values that are -1 month from the other two series sets. This means it has values for Mar - 2011 while the other two series sets are null and the other two have values for MAR-2012 while the previous forecast has null for that month. Error in my setter. Ignore this issue.
An example of the Line chart using multiple lines that are not hard coded as in the demos would be helpful. I find the documentation in the help on RadChart to be very fragmented. It's hard to follow instruction on something that is new (RadChart) when you are being shown examples of different chart types that do not apply to what you are doing. I think more, smaller examples that are split into code behind vs. XAML methods would make reading and understanding the online help much easier.
But don't take my comment to mean I am dissatisfied in any way. You guys still rock!