Hi
I have started creating a line chart in a new project using the following code and I get a weird error trying to add an ItemMapping to a SeriesMapping object. I had the chart working successfully with a DataSeries object, but I need to change to SeriesMapping apparently to use zoom + scroll properly.
The error is: 'Telerik.Windows.Controls.Charting.ItemMappingCollection' does not contain a definition for 'seriesmap1' and no extension method 'seriesmap1' accepting a first argument of type 'Telerik.Windows.Controls.Charting.ItemMappingCollection' could be found (are you missing a using directive or an assembly reference?) and is thrown on the last 2 lines below.
What am I doing wrong?
I have started creating a line chart in a new project using the following code and I get a weird error trying to add an ItemMapping to a SeriesMapping object. I had the chart working successfully with a DataSeries object, but I need to change to SeriesMapping apparently to use zoom + scroll properly.
The error is: 'Telerik.Windows.Controls.Charting.ItemMappingCollection' does not contain a definition for 'seriesmap1' and no extension method 'seriesmap1' accepting a first argument of type 'Telerik.Windows.Controls.Charting.ItemMappingCollection' could be found (are you missing a using directive or an assembly reference?) and is thrown on the last 2 lines below.
SeriesMapping seriesmap1 =
new
SeriesMapping();
seriesmap1.SeriesDefinition =
new
LineSeriesDefinition();
seriesmap1.SeriesDefinition.Appearance.Stroke =
new
SolidColorBrush(Colors.Red);
seriesmap1.SeriesDefinition.Appearance.PointMark.Fill =
new
SolidColorBrush(Colors.Transparent);
seriesmap1.SeriesDefinition.Appearance.PointMark.Stroke =
new
SolidColorBrush(Colors.Transparent);
seriesmap1.SeriesDefinition.ShowItemLabels =
false
;
ItemMapping yMapping =
new
ItemMapping(
"NumberOfPeople"
, DataPointMember.YValue);
ItemMapping xMapping =
new
ItemMapping(
"Height"
, DataPointMember.XValue);
seriesmap1.ItemMappings.Add(yMapping);
seriesmap1.ItemMappings.Add(xMapping);
What am I doing wrong?