EU Parliament Monitor - API Documentation - v0.7.7
    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

    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

    buildDashboardSection
    dashboardHasCharts