This question is locked. New answers and comments are not allowed.
Hi, I try to use a RadChart with two series definition, one has a BarSeriesDefinition and the other one has a LineSeriesDefinition, please take a look into the attached image(bad.png), except "0%" the other label's position was wrong.
However, when I just try to change ItemSource the label's position is right. please take a look into the attached image(good.png).
This is my code:
Any idea?
Thank you for the support!
However, when I just try to change ItemSource the label's position is right. please take a look into the attached image(good.png).
This is my code:
SeriesMappingCollection seriesMappings = new SeriesMappingCollection(); SeriesMapping seriesMapping = new SeriesMapping(); seriesMapping.LegendLabel = "Amount"; seriesMapping.SeriesDefinition = new BarSeriesDefinition() { ItemStyle = analysisChart.Resources["BarStyle"] as Style }; seriesMapping.ItemMappings.Add(new ItemMapping() { DataPointMember = DataPointMember.YValue, FieldName = "AMOUNT" }); seriesMapping.ItemMappings.Add(new ItemMapping() { DataPointMember = DataPointMember.XCategory, FieldName = "YEAR_QUARTER" }); seriesMappings.Add(seriesMapping); seriesMapping = new SeriesMapping(); seriesMapping.LegendLabel = "Growth Rate"; seriesMapping.SeriesDefinition = new LineSeriesDefinition() { AxisName = "GROWTH_RATE", ItemLabelFormat = "p0" }; seriesMapping.ItemMappings.Add(new ItemMapping() { DataPointMember = DataPointMember.YValue, FieldName = "GROWTH_RATE" }); seriesMapping.ItemMappings.Add(new ItemMapping() { DataPointMember = DataPointMember.XCategory, FieldName = "YEAR_QUARTER" }); seriesMappings.Add(seriesMapping); analysisChart.Chart.SeriesMappings = seriesMappings; analysisChart.Chart.DefaultView.ChartArea.AxisX = new AxisX(); analysisChart.Chart.DefaultView.ChartArea.AxisY = new AxisY() { StripLinesVisibility = System.Windows.Visibility.Collapsed }; analysisChart.Chart.DefaultView.ChartArea.AdditionalYAxes = new AxisYCollection(); analysisChart.Chart.DefaultView.ChartArea.AdditionalYAxes.Add(new AxisY() { AxisName = "GROWTH_RATE" , Title = " " , PlotAreaAxisVisibility = System.Windows.Visibility.Collapsed , DefaultLabelFormat = "p0" , ExtendDirection = AxisExtendDirection.None }); analysisChart.Chart.DefaultView.ChartArea.SmartLabelsEnabled = true;Any idea?
Thank you for the support!