# CartesianChart3DGrid

**CartesianChart3DGrid** is used to decorate the 3D Cartesian chart with grid lines and strip lines placed over the planes (sides) of the plot area.

> caption CartesianChart3DGrid

![WPF RadChartView3D CartesianChart3DGrid](https://www.telerik.com/products/wpf/documentation/assets/faae793cf53cc31e033dccebae8bfb3f/radchartview-3d-chartgrid-0.png)

## Setting up the grid

To enable the grid, set the **Grid** property of the **RadCartesianChart3D** control to an instance of the **CartesianChart3DGrid** class (see **Example 1**).

**Example 1: Setting up the grid**

```XAML
<telerik:RadCartesianChart3D.Grid>
    <telerik:CartesianChart3DGrid/>
</telerik:RadCartesianChart3D.Grid>
```

> caption Grid lines

![WPF RadChartView3D Grid lines](https://www.telerik.com/products/wpf/documentation/assets/8765d2e91ca9a9f1f097fb7357807dc7/radchartview-3d-chartgrid-1.png)

> By default only the grid lines of the plot area planes are displayed. The strip lines are not shown.

## Setting up the grid and strip lines

**CartesianChart3DGrid** allows you to specify the visibility of the grid lines and strip lines of each plane. You can also set their materials and the stroke thickness of the grid lines.

> caption Plot area planes

![WPF RadChartView3D Plot area planes](https://www.telerik.com/products/wpf/documentation/assets/91e323f98c6590409caaa45bff3b87e5/radchartview-3d-chartgrid-2.png)

To set the visibility of the grid and strip lines you can use the following properties.

* **XYGridLinesVisibility** and **XYStripLinesVisibility** for the lines in the XY plane.
* **XZGridLinesVisibility** and **XZStripLinesVisibility** for the lines in the XZ plane.
* **YZGridLinesVisibility** and **YZStripLinesVisibility** for the lines in the YZ plane.

**Example 2: Setting lines visibility**

```XAML
<telerik:CartesianChart3DGrid XZGridLinesVisibility="All" 
							  YZGridLinesVisibility="All"
							  XYGridLinesVisibility="All"
							  XYStripLinesVisibility="All"
							  XZStripLinesVisibility="All"
							  YZStripLinesVisibility="All"/>
```

## Customizing the grid and strip lines

**CartesianChart3DGrid** allows you to define custom materials for the grid and strip lines. Also, you can set the stroke thickness of the grid lines.

To set the stroke thickness of the grid lines you can use the **GridLineThickness** property.

**Example 3: Setting line stroke thickness**

```XAML
<telerik:CartesianChart3DGrid GridLineThickness="5" />
```

You can set the material (brush) of the the lines using the following properties.

* **XGridLinesMaterials** and **XStripLinesMaterials** for the lines that originate from the X axis.
* **YGridLinesMaterials** and **YStripLinesMaterials** for the lines that originate from the Y axis.
* **ZGridLinesMaterials** and **ZStripLinesMaterials** for the lines that originate from the Z axis.

**Example 4: Setting X grid lines material**

```XAML
<telerik:CartesianChart3DGrid>
    <telerik:CartesianChart3DGrid.XGridLinesMaterials>
        <MaterialCollection>
            <DiffuseMaterial Brush="#00A2E8" />
        </MaterialCollection>
    </telerik:CartesianChart3DGrid.XGridLinesMaterials>
</telerik:CartesianChart3DGrid>
```

> caption Colored grid lines

![WPF RadChartView3D Colored grid lines](https://www.telerik.com/products/wpf/documentation/assets/c1ab16c5e65043e683bc21e422113917/radchartview-3d-chartgrid-3.png)

**Example 5: Setting Y grid lines material**

```XAML
<telerik:CartesianChart3DGrid>
    <telerik:CartesianChart3DGrid.YGridLinesMaterials>
        <MaterialCollection>
            <DiffuseMaterial Brush="#22B14C" />
        </MaterialCollection>
    </telerik:CartesianChart3DGrid.YGridLinesMaterials>
</telerik:CartesianChart3DGrid>
```

> caption Colored grid lines

![WPF RadChartView3D Colored grid lines](https://www.telerik.com/products/wpf/documentation/assets/962e4ab5cbc287247aba77d3c3886510/radchartview-3d-chartgrid-4.png)

**Example 6: Setting Z grid lines material**

```XAML
<telerik:CartesianChart3DGrid>
    <telerik:CartesianChart3DGrid.ZGridLinesMaterials>
        <MaterialCollection>
            <DiffuseMaterial Brush="#FF7F27" />
        </MaterialCollection>
    </telerik:CartesianChart3DGrid.ZGridLinesMaterials>
</telerik:CartesianChart3DGrid>
```

> caption Colored grid lines

![WPF RadChartView3D Colored grid lines](https://www.telerik.com/products/wpf/documentation/assets/bf65580bd7c573a456b8b36a420f74dc/radchartview-3d-chartgrid-5.png)

> The strip lines materials are set up using the same manner as in **Examples from 4 to 6**.

## See Also

* [Getting Started](https://www.telerik.com/products/wpf/documentation/controls/radchartview3d/getting-started)
* [Camera Behavior](https://www.telerik.com/products/wpf/documentation/controls/radchartview3d/features/behaviors/camerabehavior)
* [Axes](https://www.telerik.com/products/wpf/documentation/controls/radchartview3d/axes)
