Branch
- class reportree.Branch(children: IRTree | Figure | Axes | Sequence[IRTree | Figure | Axes], title: str | None = None, labels: str | Sequence[str] | None = None)
Bases:
IRTree
Branch produces a navigation bar with buttons for selecting between its children.
Warning
The selection of pages in nested reports works correctly only when served from the webserver (even the Python one works fine for local development, python -m http.server).
The selection is done via Javascript and the targets are loaded on the fly. When the reports are displayed locally, different files are considered as Cross-Origin access and the loading is blocked by the browser. Single page reports (i.e. Leaves) work fine.
This issue can be solved by using Mozilla Firefox for local browsing with changing security.fileuri.strict_origin_policy to false (in about:config).
- Parameters:
children – List of children nodes.
title – Title of the produced HTML page.
labels – Button labels to access children pages. If not provided, children’s titles are used as labels.
- save(path: str, writer: ~reportree.io.IWriter = <class 'reportree.io.LocalWriter'>, entry: str = 'index.html')