From the ajax forum I found the following code (I can not find the equivalent code for the Silverlight chart control to position item labels in a candlestick chart):
RadChart1.Series[0].Appearance.LabelAppearance.LabelLocation = Telerik.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Inside; |
RadChart1.Series[0].Appearance.LabelAppearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.BottomRight; |
A stripped down version of my code is the following:
RadChart radChart = new RadChart();
radChart.ItemsSource = seriesList;
SeriesMapping sm = new SeriesMapping();
ItemMapping imHigh = new ItemMapping("High", DataPointMember.High);
ItemMapping imLow = new ItemMapping("Low", DataPointMember.Low);
ItemMapping imOpen = new ItemMapping("Open", DataPointMember.Open);
ItemMapping imClose = new ItemMapping("Close", DataPointMember.Close);
ItemMapping imXCategory = new ItemMapping("XCategory", DataPointMember.XCategory);
ItemMapping imLabel = new ItemMapping("Label", DataPointMember.Label);
sm.ItemMappings.Add(imHigh);
sm.ItemMappings.Add(imLow);
sm.ItemMappings.Add(imOpen);
sm.ItemMappings.Add(imClose);
sm.ItemMappings.Add(imXCategory);
sm.ItemMappings.Add(imLabel);
CandleStickSeriesDefinition cssd = new CandleStickSeriesDefinition();
cssd.ShowItemLabels = true;
sm.SeriesDefinition = cssd;
radChart.SeriesMappings.Add(sm);