---
title: "Doughnut ViewHelper <c:chart.doughnut>"
manual: "SAV Charts"
version: "14.7"
source: "Reference/FluidParserViewHelpers/Chart/DoughnutViewHelper/Index.rst"
rendered: "2026-09-17T13:01:15+00:00"
---

# Doughnut ViewHelper \<c:chart.doughnut> {#doughnut-viewhelper-c-chart-doughnut}

ViewHelper to include a doughnut chart with `Charts.js`.

Go to the source code of this ViewHelper:
[DoughnutViewHelper.php](https://github.com/YolfTypo3/SavCharts/blob/main/Classes/ViewHelpers/Chart/DoughnutViewHelper.php) (GitHub).

## Quick Test {#quick-test}

```xml
<c:template id="1">
EXT:sav_charts/Resources/Private/Templates/ChartsExamples/FluidParser/DoughnutChart.fluid"
</c:template>
```

![](../../../../Images/ScreenShots/Charts/doughnutChart.png)

## Arguments {#arguments}

-   **id**

    -   *Required:* true
    -   *Type:* string

    Chart ID

-   **data**

    -   *Required:* true
    -   *Type:* mixed

    Data, or a reference to data

-   **options**

    -   *Type:* mixed

    Options, or a reference to options

-   **width**

    -   *Type:* string
    -   *Default:* 600

    Width value, or a reference to the width value

-   **height**

    -   *Type:* string
    -   *Default:* 400

    Height value, or a reference to the height value

## Examples {#examples}

### Defining a Doughnut Chart {#defining-a-doughnut-chart}

```xml
<c:charts>
    <c:chart.doughnut id="1" data="data__doughnutChartData" options="data__doughnutChartOptions" >
        ...
    </c:chart.doughnut>
</c:charts>
```
