EU Parliament Monitor — API Documentation - v0.8.40
    Preparing search index...

    Module Generators/DashboardContent

    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.

    Functions

    buildCoalitionPanel
    buildPipelinePanel
    buildTrendPanel
    buildStakeholderScorecardPanel
    buildDashboardSection
    dashboardHasCharts
    buildEconomicContextPanel