#74 — Add support for KPI tiles and refactor Echarts to accomodate new version of data structure.
Repo: Twill-AI/twill-ai-ui State: closed | Status: done Assignee: meliascosta
Created: 2024-10-21 · Updated: 2025-03-11
Description
The widget structure will be slightly refactored to accommodate KPI tiles and possibly more widget types in the future. The new structure will be as follows:
class ChatResponseWidget:
"""Response with Widget code in chat."""
type: Literal["echarts", "kpi". "table"]
code: str
sql_query: str
headers: List[str]
rows: List[List[Any]]
name: str
values_update_interval_sec: intUPDATE: We are including tables in this format as well so we can drag them into a dashboard and update them.
AC:
- Echarts Charts render correctly with the new message structure.
- KPI tiles are displayed correctly on the frontend.
- Tables are also rendered using this new uniform data structure.
See related facade and llm-engine sides of the task.
Notes
Add implementation notes, blockers, and context here
Related
Add wikilinks to related people, meetings, or other tickets