[FrontEnd] Design UI for structured KPI data visualization
Several KPIs return this kind of structured response and need to be properly handled. According to the README file of the KPI Library, we can find the expected output format for each KPI type
The KPI text.count_words_percent returns a structured JSON containing a list of items with associated frequency values (as percentages). The goal of this task is to define how this type of structured KPI data should be visualised in the frontend.
Example of the returned value for text.count_words_percent:
{
"name": "Municipality_text.count_words_percent",
"metric": "text.count_words_percent",
"value": [
{ "item": 1, "frequency": 69.63 },
{ "item": 2, "frequency": 5.52 },
{ "item": 3, "frequency": 17.95 },
{ "item": 4, "frequency": 6.11 },
{ "item": 5, "frequency": 0.79 }
],
"createdAt": "2025-06-13T08:42:55.069Z",
"createdBy": "5bd93f4b-13d9-4567-a44d-9baa0eaee62a",
"parameters": []
}
/cc @jordiarjona , @edgarloba , @emiedesiti, @anacosta, @imurua
Edited by Antoni Gimeno