Hi,
I have a chart that uses error-bar to draw vertical lines on a time-chart.
I would like to make the line dashed or dotted but I could not figure out to set the stroke dash array of the error-bar.
Can this be done?
Thanks.
Hello Eli,
Thank you for contacting Infragistics. Both the vertical and horizontal error bars have their own designated style properties that you can use to draw your own appearance. There is no built in dotted line style.
eg. HorizontalErrorBarStyle & VerticalErrorBarStyle.
You may refer to our help topic article for more detailshttps://es.infragistics.com/help/wpf/datachart-series-error-bars
You can suggest new product ideas for future versions (or vote for existing ones) at <https://es.infragistics.com/community/ideas>.
Let me know if you have any questions.
Hi, thank you for your help, I have managed to provide a custom brush to the stroke to enable the appearance.
I'm attaching the code for anyone that needs it (note: this is an older version of the component so the series ErrorBar is shared by vertical and horizontal together.
int spaces = displayAttributes.LineType == LineType.Dashed ? 4 : 2; DrawingBrush dashedBrush = new DrawingBrush() { Viewport = new Rect(0, 0, spaces, spaces), ViewportUnits = BrushMappingMode.Absolute, TileMode = TileMode.Tile }; DrawingGroup dg = new DrawingGroup(); dashedBrush.Drawing = dg; GeometryDrawing gd = new GeometryDrawing() { Brush = brush }; dg.Children.Add(gd); GeometryGroup gg = new GeometryGroup(); gd.Geometry = gg; gg.Children.Add(new RectangleGeometry(new Rect(0, 0, 50, 50))); gg.Children.Add(new RectangleGeometry(new Rect(50, 50, 50, 50)));
ls.ErrorBarSettings.Stroke = dashedBrush;