FastLineSeries series1 = new FastLineSeries() { StrokeDashArray = new DoubleCollection() { 2, 2 }, Interior = new SolidColorBrush(Colors.Blue) }; chart.Series.Add(series1); |
FastLineBitmapSeries series2 = new FastLineBitmapSeries() { StrokeDashArray = new DoubleCollection() { 3, 2 }, Interior = new SolidColorBrush(Colors.Black) }; chart.Series.Add(series2); |
FrameworkElementFactory lineFactory = new FrameworkElementFactory(typeof(Line)); lineFactory.SetValue(Line.StrokeDashArrayProperty, new DoubleCollection() { 3, 2 }); lineFactory.SetValue(Line.StrokeProperty, new Binding() { Path = new PropertyPath("Interior")}); lineFactory.SetValue(Line.StrokeThicknessProperty, new Binding() { Path = new PropertyPath("StrokeThickness") }); lineFactory.SetValue(Line.X1Property, new Binding() { Path = new PropertyPath("X1")}); lineFactory.SetValue(Line.X2Property, new Binding() { Path = new PropertyPath("X2")}); lineFactory.SetValue(Line.Y1Property, new Binding() { Path = new PropertyPath("Y1")}); lineFactory.SetValue(Line.Y2Property, new Binding() { Path = new PropertyPath("Y2")}); LineSeries series3 = new LineSeries() { Interior = new SolidColorBrush(Colors.Purple), CustomTemplate = new DataTemplate() { VisualTree = lineFactory } }; chart.Series.Add(series3); |
many tnx Devi.