Pure functions for building dashboard HTML sections with
metric cards and chart containers. Designed for agentic workflows to
extend any article type with data dashboards using data from European
Parliament MCP, World Bank API, or other data sources.
Dashboard components:
Metric cards: Key performance indicators with trends
Chart containers: Canvas elements with embedded Chart.js configuration
as data attributes, ready for client-side hydration
Coalition panels: Radar charts showing political group alignment
Pipeline panels: Bar charts showing legislative procedure status
Trend panels: Sparkline charts showing activity over time
Stakeholder scorecards: Color-coded impact grids
Chart configurations are embedded as JSON in data-chart-config attributes
on <canvas> elements. An external client-side initialization script
provided by the embedding application can hydrate these using Chart.js
at runtime by reading the data-chart-config attributes.
Description
Pure functions for building dashboard HTML sections with metric cards and chart containers. Designed for agentic workflows to extend any article type with data dashboards using data from European Parliament MCP, World Bank API, or other data sources.
Dashboard components:
Chart configurations are embedded as JSON in
data-chart-configattributes on<canvas>elements. An external client-side initialization script provided by the embedding application can hydrate these using Chart.js at runtime by reading thedata-chart-configattributes.