Posted 20 August 2019, 9:58 pm EST
Hi Parthiv,
To prevent grid lines from rendering over column/bar, it’s possible to move columns to the front after rendering the chart. For this, one should handle the Rendered event and inside invoke SetZIndex method, as follows:```
private void chart_Rendered(object sender, C1.WPF.Chart.RenderEventArgs e)
{
// find render canvas
var cnv = chart.FindFirstChild<C1.WPF.Chart.RenderCanvas>();
foreach (var item in cnv.Children)
{
var rect = item as System.Windows.Shapes.Rectangle;
if (rect != null)
{
// move to the front
Canvas.SetZIndex(rect, 1);
//Use opaque fill
rect.Fill = rect.Stroke;
}
}
}
[img]https://gccontent.blob.core.windows.net/forum-uploads/file-c9128779-4e6c-4f76-bf57-c488444b4cf2.png[/img]
[zip filename="ColumnChart.zip"]https://gccontent.blob.core.windows.net/forum-uploads/file-987e9460-51a9-430a-8308-05b62c8b7faf.zip[/zip]
Best wishes,
Ruchir