public ViewModel() { var data = new[] { new City { Name = "Tokyo", Population = 4 }, new City { Name = "New York", Population = 6 }, new City { Name = "Seoul", Population = 2 }, new City { Name = "Moscow", Population = 8 }, new City { Name = "Shanghai", Population = 3 }, new City { Name = "Guadalajara", Population = 4 } }; var polarLineSeries = new PolarLineSeries <City> { Values = data, TooltipLabelFormatter = point => $"{point.Model.Name} {point.Model.Population} Million", Mapping = (city, point) => { point.PrimaryValue = city.Population; // use the population property in this series // mark point.SecondaryValue = point.Context.Index; } }; polarLineSeries.DataPointerDown += PolarLineSeries_DataPointerDown; Series = new ISeries[] { polarLineSeries, new PolarLineSeries <int> { Values = new[] { 6, 7, 2, 9, 6, 2 } }, }; }
private void BindChartToLineSeries() { this.radChartView1.Area.Series.Clear(); PolarLineSeries cardioidSeries = new PolarLineSeries("Value", "Angle"); cardioidSeries.DataMember = "Cardioid"; cardioidSeries.BorderWidth = 2; this.radChartView1.Series.Add(cardioidSeries); cardioidSeries.BorderColor = Color.FromArgb(200, 142, 196, 65); cardioidSeries.PointSize = SizeF.Empty; PolarLineSeries shotgunFrontSeries = new PolarLineSeries("Value", "Angle"); shotgunFrontSeries.DataMember = "ShotgunFront"; shotgunFrontSeries.BorderWidth = 2; this.radChartView1.Series.Add(shotgunFrontSeries); shotgunFrontSeries.BorderColor = Color.FromArgb(200, 27, 157, 222); shotgunFrontSeries.PointSize = SizeF.Empty; PolarLineSeries shotgunSideSeries = new PolarLineSeries("Value", "Angle"); shotgunSideSeries.DataMember = "ShotgunSide"; shotgunSideSeries.BorderWidth = 2; shotgunSideSeries.PointSize = SizeF.Empty; this.radChartView1.Series.Add(shotgunSideSeries); shotgunSideSeries.BorderColor = Color.FromArgb(200, 27, 157, 222); shotgunSideSeries.PointSize = SizeF.Empty; cardioidSeries.PolarAxis.Minimum = 0d; cardioidSeries.PolarAxis.Maximum = 1d; cardioidSeries.PolarAxis.MajorStep = 0.2d; cardioidSeries.PolarAxis.TickLength = 0; cardioidSeries.PolarAxis.MajorTickOffset = 1; cardioidSeries.PolarAxis.LastLabelVisibility = AxisLastLabelVisibility.Hidden; cardioidSeries.PolarAxis.LabelFormatProvider = new AxisLabelFormat(); cardioidSeries.RadialAxis.LabelFormat = "{0}°"; cardioidSeries.RadialAxis.TickLength = 0; }