Skip to main content

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.

  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:
{
   "data":{
      "ConceptosDistribuidosIngresos":[
         {
            "Descripcion":"Diezmo",
            "Valor":14
         },
         {
            "Descripcion":"Ofrendas",
            "Valor":148447
         }
      ]
   }
}
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”
{
  "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"
    }
  ]
}

Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question. Perform an HTTP GET request on the current page URL with the ask query parameter:
GET https://codenull.gitbook.io/dev/configurations/components/dashboards/transform-properties.md?ask=<question>
The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation. Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.