Quick Start¶
This guide will get you up and running with sphinx-needs-tree-map in 5 minutes.
Basic Treemap¶
Once installed, add a treemap to any document with the needtreemap directive:
.. needtreemap::
This creates a treemap of all needs in your documentation, organized by document.
Customizing the View¶
Filter by Type¶
Show only specific need types:
.. needtreemap::
:types: req,spec
Or use a filter expression:
.. needtreemap::
:filter: type == 'req' or type == 'spec'
Change Hierarchy Mode¶
The extension supports three hierarchy modes:
Document mode (default) - Groups needs by document and sections:
.. needtreemap::
:hierarchy: document
Links mode - Uses parent-child link relationships:
.. needtreemap::
:hierarchy: links
Type mode - Groups by need type and status:
.. needtreemap::
:hierarchy: type
Color by Status¶
Color nodes by their status instead of type:
.. needtreemap::
:color_by: status
Show Values¶
Display counts in node labels:
.. needtreemap::
:show_values:
Complete Example¶
Here’s a full-featured treemap configuration:
.. needtreemap::
:filter: type in ['req', 'spec', 'test']
:hierarchy: document
:depth: 3
:color_by: type
:show_values:
:height: 600px
:title: Requirements Overview
Next Steps¶
See needtreemap Directive for all available options
Check out Configuration for global settings
Browse Examples for more use cases