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.

series: list[list[float]][source]
canvas_origin_x[source]
canvas_origin_y[source]
canvas_size_w[source]
canvas_size_h[source]
area_fraction[source]
id = ''[source]
labels: list[str] | None[source]
colors: list | None[source]
whis[source]
y_range_mode = 'auto'[source]
y_min: float | None[source]
y_max: float | None[source]
box_width_fraction[source]
show_mean = False[source]
show_outliers = True[source]
show_labels = True[source]
show_area_frame = True[source]
frame_color[source]
border_color[source]
median_color[source]
legend_text_color[source]
frame_line_width[source]
box_line_width[source]
whisker_line_width[source]
median_line_width[source]
mapviewer = None[source]
editor: wolfhece.assets.boxplot.editor.BoxplotZonesEditor | None = None[source]
zones: wolfhece.PyVertexvectors.Zones | None = None[source]
_build_asset() wolfhece.assets.boxplot.zones_asset.BoxplotZonesAsset[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.

_get_mapviewer_objects() list[source]
_get_vector_draw_type()[source]
_get_vector_by_id(obj_id: str)[source]
_find_bound_zones_in_mapviewer() wolfhece.PyVertexvectors.Zones | None[source]
_resolve_unique_id(preferred: str, exclude_obj=None) str[source]
attach_to_mapviewer(mapviewer, id: str | None = None, ToCheck: bool = True) wolfhece.PyVertexvectors.Zones[source]
show_editor(parent=None)[source]
to_dict() dict[source]
static from_dict(data: dict) BoxplotZonesController[source]
save_json(path: str | pathlib.Path) None[source]
static load_json(path: str | pathlib.Path) BoxplotZonesController[source]