void FillSeries(MarkerSeries2D series) { if (series == null) { return; } AreaSeries2D areaSeries = series as AreaSeries2D; if (areaSeries != null) { areaSeries.Transparency = 0.8; areaSeries.MarkerVisible = true; } LineSeries2D lineSeries = series as LineSeries2D; if (lineSeries != null) { lineSeries.MarkerVisible = true; } series.ColorEach = true; series.AnimationAutoStartMode = AnimationAutoStartMode.SetStartState; AddPoint(series, new SeriesPoint(1.0, 2.1), 1.0); AddPoint(series, new SeriesPoint(2.0, 1.4), 2.0); AddPoint(series, new SeriesPoint(3.0, 1.1), 4.0); AddPoint(series, new SeriesPoint(4.0, 1.9), 3.0); AddPoint(series, new SeriesPoint(5.0, 3.1), 2.5); AddPoint(series, new SeriesPoint(6.0, 2.4), 1.7); AddPoint(series, new SeriesPoint(7.0, 2.6), 3.9); AddPoint(series, new SeriesPoint(8.0, 1.9), 2.8); AddPoint(series, new SeriesPoint(9.0, 3.2), 2.1); AddPoint(series, new SeriesPoint(10.0, 3.5), 1.3); ((ISupportMarker2D)series).MarkerModel = chart.Resources["CustomMarker2DModel"] as CustomMarker2DModel; series.Label = new SeriesLabel(); series.Label.ConnectorVisible = false; series.Label.ResolveOverlappingMode = ResolveOverlappingMode.Default; DataTemplate labelTemplate = chart.Resources["labelTemplate"] as DataTemplate; if (labelTemplate != null) { series.Label.ElementTemplate = labelTemplate; series.Label.RenderMode = LabelRenderMode.CustomShape; } if (!(series is BubbleSeries2D)) { ((ISupportMarker2D)series).MarkerSize = 19; series.Label.Indent = 15; } else { series.Label.Indent = 5; MarkerSeries2D.SetAngle(series.Label, 90); BubbleSeries2D.SetLabelPosition(series.Label, Bubble2DLabelPosition.Outside); } chart.Diagram.Series.Clear(); chart.Diagram.Series.Add(series); if (!loading) { chart.Animate(); } }
void slAngle_EditValueChanged(object sender, EditValueChangedEventArgs e) { chart.BeginInit(); foreach (PointSeries2D series in chart.Diagram.Series) { MarkerSeries2D.SetAngle(series.Label, (double)e.NewValue); } chart.EndInit(); }