---
title: "Pie ViewHelper <c:plotlychart.pie>"
manual: "SAV Charts"
version: "main"
permalink: "https://docs.typo3.org/permalink/yolftypo3/sav-charts:plotlychart-pieviewhelper@main"
source: "Reference/FluidParserViewHelpers/PlotlyChart/PieViewHelper/Index.rst"
rendered: "2026-10-09T13:07:41+00:00"
---

# Pie ViewHelper \<c:plotlychart.pie> {#plotlychart-pieviewhelper}

ViewHelper to include a pie chart with `Plotly`.

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

## Quick Test {#quick-test}

```xml
<c:template id="1">
EXT:sav_charts/Resources/Private/Templates/PlotlyChartsExamples/PieChart.fluid"
</c:template>
```

![](../../../../Images/ScreenShots/PlotlyCharts/pieChart.png)

## Arguments {#arguments}

-   **id**

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

    Chart ID

-   **data**

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

    Data, or a reference to data

-   **layout**

    -   *Type:* mixed

    Layout, or a reference to layout

-   **config**

    -   *Type:* mixed

    Config, or a reference to config

-   **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 Pie Chart {#defining-a-pie-chart}

```xml
<c:plotlycharts>
    <c:plotlychart.pie id="1" data="data__pieChartData" layout="data__pieChartLayout" >
        ...
    </c:plotlychart.pie>
</c:plotlycharts>
```
