Hello,
I am looking for a way to use the custom data series line styles (dotted and dashed lines) I am using, and display them in the legend. I'm required to show the lines as different line styles with the SAME color for each series, thus my need to differentiate them by line style only.
I've creating the line styles using your example code:
Style pathStyle1 = new Style(typeof(Path));
pathStyle1.Setters.Add(new Setter(Shape.StrokeDashArrayProperty, "1"));
pathStyle1.Setters.Add(new Setter(Shape.StrokeProperty, new SolidColorBrush(Colors.Cyan)));
pathStyle1.Setters.Add(new Setter(Shape.StrokeThicknessProperty, 3));
Style lineStyle1 = new Style(typeof(Telerik.Windows.Controls.Charting.SelfDrawingSeries));
lineStyle1.Setters.Add(new Setter(SelfDrawingSeries.BorderLineStyleProperty, pathStyle1));
series.Definition.SeriesStyle = lineStyle1;
Is there a way to show the same Shape.StrokeDashArrayProperty, "1") line within the legend area? And while I'm wishing, is there a way to do this programmatically as I populating the chart dynamically?
Thanks!
Scott
I am looking for a way to use the custom data series line styles (dotted and dashed lines) I am using, and display them in the legend. I'm required to show the lines as different line styles with the SAME color for each series, thus my need to differentiate them by line style only.
I've creating the line styles using your example code:
Style pathStyle1 = new Style(typeof(Path));
pathStyle1.Setters.Add(new Setter(Shape.StrokeDashArrayProperty, "1"));
pathStyle1.Setters.Add(new Setter(Shape.StrokeProperty, new SolidColorBrush(Colors.Cyan)));
pathStyle1.Setters.Add(new Setter(Shape.StrokeThicknessProperty, 3));
Style lineStyle1 = new Style(typeof(Telerik.Windows.Controls.Charting.SelfDrawingSeries));
lineStyle1.Setters.Add(new Setter(SelfDrawingSeries.BorderLineStyleProperty, pathStyle1));
series.Definition.SeriesStyle = lineStyle1;
Is there a way to show the same Shape.StrokeDashArrayProperty, "1") line within the legend area? And while I'm wishing, is there a way to do this programmatically as I populating the chart dynamically?
Thanks!
Scott