wolfhece.assets.boxplot.controller
Persistent controller for editable boxplot chart assets.
Stores editable parameters, keeps a pointer to the current Zones object in the mapviewer, and can rebuild geometry dynamically.
Module Contents
- class wolfhece.assets.boxplot.controller.BoxplotZonesController(series: Sequence[Sequence[float]], *, canvas_origin: tuple[float, float] = (0.0, 0.0), canvas_size: tuple[float, float] = (100.0, 80.0), area_fraction: tuple[float, float, float, float] = (0.1, 0.08, 0.92, 0.88), id: str = 'boxplot', labels: Sequence[str] | None = None, colors: Sequence[tuple[int, int, int] | tuple[int, int, int, int]] | None = None, whis: float = 1.5, y_min: float | None = None, y_max: float | None = None, y_range_mode: str = 'auto', box_width_fraction: float = 0.55, show_mean: bool = False, show_outliers: bool = True, show_labels: bool = True, show_area_frame: bool = True, frame_color: tuple[int, int, int] = (40, 40, 40), border_color: tuple[int, int, int] = (25, 25, 25), median_color: tuple[int, int, int] = (20, 20, 20), legend_text_color: tuple[int, int, int] = (0, 0, 0), frame_line_width: float = 1.0, box_line_width: float = 1.0, whisker_line_width: float = 1.0, median_line_width: float = 2.0, mapviewer=None, editor: wolfhece.assets.boxplot.editor.BoxplotZonesEditor | None = None)[source]
Persistent controller for editable boxplot assets.
- editor: wolfhece.assets.boxplot.editor.BoxplotZonesEditor | None = None[source]
- update_canvas(x: float | None = None, y: float | None = None, width: float | None = None, height: float | None = None, rebuild: bool = True) None[source]
Update canvas position / size.
- get_transform_bounds() tuple[float, float, float, float][source]
Return editable asset bounds as
(xmin, ymin, xmax, ymax).
- apply_transform_bounds(bounds: tuple[float, float, float, float], *, rebuild: bool = True) None[source]
Apply rectangle bounds produced by map drag/resize handles.
- update_data(series: Sequence[Sequence[float]] | None = None, labels: Sequence[str] | None = None, colors: Sequence[tuple] | None = None, rebuild: bool = True) None[source]
- rebuild(ToCheck: bool = True) wolfhece.PyVertexvectors.Zones[source]
Rebuild geometry from current parameters and update mapviewer.
- attach_to_mapviewer(mapviewer, id: str | None = None, ToCheck: bool = True) wolfhece.PyVertexvectors.Zones[source]
- static from_dict(data: dict) BoxplotZonesController[source]
- static load_json(path: str | pathlib.Path) BoxplotZonesController[source]