Search code examples
devexpress-wpf

How to remove AxisX grid lines from the chart


I want to remove Gridlines form Chart to achieve that I have written following code but without success.

    <Charts:AxisX ShowMajorGridlines="False">
       <Charts:AxisX.LabelOptions>
                 <Charts:AxisLabelOptions Foreground="White"/>
       </Charts:AxisX.LabelOptions>
    </Charts:AxisX>

How to remove gridlines form chart ??

Note: Here I am attaching a sample application along with a screenshot for better understanding please take a moment to review it.

Thanks & regards, Rudresh Bhatt


Solution

  • To remove horizontal grid line set AxisY 's ShowMajorGridlines property to false. Therefore the mark up will be like

    <Charts:CartesianChart.AxisY>
                    <Charts:AxisY ShowMajorGridlines="False" />
    </Charts:CartesianChart.AxisY>
    

    Thanks