Riksdagsmonitor Intelligence Platform โ€” API Documentation - v0.8.54
    Preparing search index...
    • Generate a color-coded mindmap section.

      Returns a TemplateSection (pure HTML/CSS โ€” no JavaScript) that can be appended to ArticleData.sections. The mindmap renders a central topic node surrounded by colored branch nodes, each optionally containing child items, AI-weighted items, and stakeholder sub-branches.

      Supports AI-driven conceptual mapping features:

      • centralThesis โ€” AI-synthesized statement in the center node
      • connections โ€” Cross-branch connection indicators
      • MindmapBranch.aiItems โ€” Weighted items with data-weight attribute
      • MindmapBranch.subBranches โ€” Stakeholder sub-branches (hierarchical depth)

      The CSS for .mindmap-section lives in styles/components/mindmap.css (imported by styles.css). No client-side JS is required or loaded.

      Parameters

      Returns TemplateSection

      const section = generateMindmapSection({
      topic: 'Cybersecurity Policy',
      lang: 'en',
      centralThesis: 'Parliamentary focus on cybersecurity spans defensive legislation and EU alignment.',
      branches: [
      {
      label: 'Key Actors',
      color: 'cyan',
      icon: '๐Ÿ‘ฅ',
      dimension: 'power',
      aiItems: [
      { text: 'Ministry of Defence', weight: 'critical' },
      { text: 'NCSC', weight: 'significant' },
      ],
      subBranches: [
      { label: 'Government', items: ['Policy initiative', 'Regulatory mandate'] },
      { label: 'Opposition', items: ['Oversight function', 'Amendment proposals'] },
      ],
      },
      ],
      });
      articleData.sections = [...(articleData.sections ?? []), section];