Transpose ViewHelper <c:transpose> 

ViewHelper that transposes data.

Go to the source code of this ViewHelper: TransposeViewHelper.php (GitHub).

Arguments 

The following arguments are available for the transpose ViewHelper:

data

data
Required

true

Type
array

Data to transpose

Examples 

With data attribute 

<c:data id="data">
    <c:item key="0" values="65, 59, 80, 81, 56, 55, 40" />
    <c:item key="1"values="1.5, 3, 5, 10, 17, 20, 24" />  
</c:data>

<f:variable name="tranposedData"><c:transpose data="{data__data}" /></f:variable>
Copied!

Inline 

<c:data id="data">
    <c:item key="0" values="65, 59, 80, 81, 56, 55, 40" />
    <c:item key="1"values="1.5, 3, 5, 10, 17, 20, 24" />  
</c:data>

<f:variable name="tranposedData" value="{data__data->c:transpose()}" />
Copied!