This example demonstrates one of possible ways to use the CustomDrawSeries event. In this sample the event is used to modify the legend markers of bar series.
Added By: Ralf Boscher at: 7/29/2016 4:51:26 AM Hello,
the example only draws rectangles - how to draw:
DashStyle.Dash
how to draw dots, dashdot or DashDotDot etc.
Thank you
Ralf Added By: Rоman K (DevExpress) at: 7/29/2016 5:25:59 AM Hello, Ralf.
In this example, legend markers are images rendered using the System.Drawing.Graphics class. To draw lines with the required DashStyle, use the following approach.
Question Comments
Added By: Ralf Boscher at: 7/29/2016 4:51:26 AM Hello,
the example only draws rectangles - how to draw:
DashStyle.Dash
DashStyle.DashDot
DashStyle.DashDotDot
DashStyle.Dot
DashStyle.Dash
Thank you
Ralf
how to draw dots, dashdot or DashDotDot etc.
Thank you
Ralf Added By: Rоman K (DevExpress) at: 7/29/2016 5:25:59 AM Hello, Ralf.
In this example, legend markers are images rendered using the System.Drawing.Graphics class. To draw lines with the required DashStyle, use the following approach.
[C#]graphics.DrawLine(newPen(e.LegendDrawOptions.Color){DashStyle=isSelected?System.Drawing.Drawing2D.DashStyle.DashDotDot:System.Drawing.Drawing2D.DashStyle.Dash,Width= 4},newPoint(0,totalHeight/ 2),newPoint(totalWidth,totalHeight/ 2));
Feel free to contact us if you need further assistance.