Hi. Please refer the attachment. I need to show like this. One bar dashed and other is solid bordered. How can I do this? I tried but could not get dashed column(I got Both columns as solid). Please give the solution to achieve this.
Thanks in advance!
Sridhar
One of the easier ways is to create an override with column=0, Row=-2 and set the fill color to transparent. But this way you won't get the dashed lines. Here's a link to using overrides:http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.1/CLR3.5/html/Chart_Apply_an_Override_to_a_Chart.html
A more invoved way is to handle FillSceneGraph event and for every box with Column = 0 clear the fill color and apply a line style.
Hai
I used the following code in fillscenegraph event but dint get success. Can you please guide me to get the row=-2, column=1 as dotted line? Can you post the code to get this?
if (e.ChartCore.ChartType == ChartType.ColumnChart) { foreach (Primitive p in e.SceneGraph) { if (p.Path != null) { if (p is Box && p.Row == -2 && p.Column == 1) { //To set the box fill as transparent
p.PE.Fill = System.Drawing.Color.Transparent;
/*I dont know code how to get dotted line*/ }
} }
}
Thanks in advance.
you need to cast the primitive as a Box to set the line style.
Box box = p as Box;if (box != null){ box.lineStyle.DrawStyle = LineDrawStyle.Dash;}Also, the Row property value won't be at -2, you can omit that condition.
Hi
It works . Thanks. But please refer the attachment. The line is not clear as dashed(Small and thin). I need to increase the gap between lines but could not. I want it as clear dashed(Thick). Help me regarding this.
a single pixel dashed line can often appear blurry due to anti-aliasing. setting SmoothingMode=None on the chart will remedy this problem but may have some side effects like diagonal lines appearing pixelated.
This is a standard .net dash style and cannot be controlled. You can increase the thickness by setting PE.StrokeWidth on the box.