Hello,
I was following this thread (http://www.telerik.com/community/forums/silverlight/chart/dashed-dotted-line.aspx) on creating dashed/dotted lines for Series in the code-behind. I was able to successfully do this by creating a separate style for each SeriesMapping.SeriesDefinition. However, if I try to do this to only the DefaultSeriesDefinition, the dotted lines do not show up correctly. The series are all colored the same and have the correct thickness, but only the first series is dashed.
Example code:
Is there any way to do this using the DefaultSeriesDefinition? Also, why are the color and thickness applied properly to all series, but not the StrokeDashArray?
Thanks,
Sean
I was following this thread (http://www.telerik.com/community/forums/silverlight/chart/dashed-dotted-line.aspx) on creating dashed/dotted lines for Series in the code-behind. I was able to successfully do this by creating a separate style for each SeriesMapping.SeriesDefinition. However, if I try to do this to only the DefaultSeriesDefinition, the dotted lines do not show up correctly. The series are all colored the same and have the correct thickness, but only the first series is dashed.
Example code:
Style tempStyle =
new
Style(
typeof
(SelfDrawingSeries));
Style borderLineStyle =
new
Style(
typeof
(Path));
borderLineStyle.Setters.Add(
new
Setter(Shape.StrokeDashArrayProperty,
"1"
));
borderLineStyle.Setters.Add(
new
Setter(Shape.StrokeThicknessProperty, 2));
borderLineStyle.Setters.Add(
new
Setter(Shape.StrokeProperty,
new
SolidColorBrush(Colors.Cyan)));
tempStyle.Setters.Add(
new
Setter(SelfDrawingSeries.BorderLineStyleProperty, borderLineStyle));
radChart1.DefaultSeriesDefinition.SeriesStyle = tempStyle;
Is there any way to do this using the DefaultSeriesDefinition? Also, why are the color and thickness applied properly to all series, but not the StrokeDashArray?
Thanks,
Sean