---
title: "Data ViewHelper <c:data>"
manual: "SAV Charts"
version: "14.7"
source: "Reference/FluidParserViewHelpers/DataViewHelper/Index.rst"
rendered: "2026-09-17T13:01:15+00:00"
---

# Data ViewHelper \<c:data> {#data-viewhelper-c-data}

ViewHelper which defines data.

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

## Arguments {#arguments}

The following arguments are available for the data ViewHelper:

-   **id**

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

    Data ID

-   **values**

    -   *Type:* mixed

## Examples {#examples}

### With values attribute {#with-values-attribute}

```xml
<c:data id="size" values="12" />
<c:data id="columnHeader" values="{data__labels}" />

```

### Child nodes {#child-nodes}

```xml
<c:data id="dataSets">
    <c:item key="0" value="{data__set0}" />
    <c:item key="1" value="{data__set1}" />
</c:data>
```

```xml
<c:data id="labels">
    January, February, March, April, May, June, July
</c:data>
```

> [!NOTE]
> ```xml
> <c:data id="example1" values="A, B, C, D" />
> ```
>
> is equivalent to
>
> ```xml
> <f:variable name="data__example1" value="A, B, C, D" />
> ```
>
> but
>
> ```xml
> <c:data id="example2">A, B, C, D</c:data>
> ```
>
> is equivalent to
>
> ```xml
>
> <f:variable name="data__example2" value="{0:'A', 1:'B', 2:'C', 3:'D'}" />
> ```
