> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codenullapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Transform properties

> 1. labelPath: This is the label that will show up in the chart

1. **labelPath:** This is the label that will show up in the chart
2. **dataPath:** This is the data that will show up in the chart
3. **customFunctions**: A List of functions to transform data that comes in the datasource
4. **formats**: A list of formats that can be applied to the data.

These values come from the result of the Stored Procedure

#### *Example of labelPath and dataPath*

```
{
  "labelPath": "Descripcion",
  "dataPath": "Valor"
}
```

we will see a response example:

```graphql theme={null}
{
   "data":{
      "ConceptosDistribuidosIngresos":[
         {
            "Descripcion":"Diezmo",
            "Valor":14
         },
         {
            "Descripcion":"Ofrendas",
            "Valor":148447
         }
      ]
   }
}
```

<img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/-MgFyT7Y5Gbnojygm1MR.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=286a747d28fb856415173333585bb618" alt="" width="644" height="340" data-path="images/-MgFyT7Y5Gbnojygm1MR.png" />

<img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/-MgFyjnhu56kujecqvRA.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=6aed9e8a7dedb33193e1c3429f75a8a7" alt="" width="550" height="420" data-path="images/-MgFyjnhu56kujecqvRA.png" />

Examples of **customFunctions** and **formats**

In this example, the custom function allows to add the months to the dashboard dataset and the format allows to group the data by "Categoría"

```graphql theme={null}
{
  "customFunctions": [
    {
      "type": "transformData",
      "code": " const labels = [\n    'Enero',\n    'Febrero',\n    'Marzo',\n    'Abril',\n    'Mayo',\n    'Junio',\n    'Julio',\n    'Agosto',\n    'Septiembre',\n    'Octubre',\n    'Noviembre',\n    'Diciembre',\n  ];\n  const newData = {};\n  newData.labels = labels;\n  newData.datasets = Object.values(data).map(ds => ({\n    ...ds[0],\n    label: ds[0].Categoria,\n    data: labels.map(l => {\n      let result = 0;\n      ds.forEach(d => {\n        if (d.Month === labels.indexOf(l) + 1) {\n          result = d.Cantidad;\n        }\n      });\n      return result;\n    }),\n  }));\n\n  g2c.data = newData;"
    }
  ],
  "labelPath": "Month",
  "dataPath": "Categoria.data",
  "formats": [
    {
      "path": "Categoria",
      "type": "GROUP_BY_FIELD"
    }
  ]
}
```

<img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/-MgGZPbQnopdFCuufE4U.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=60135106c638d2f1885c72612eb9dd63" alt="" width="1424" height="706" data-path="images/-MgGZPbQnopdFCuufE4U.png" />
