wolfhece.assets.boxplot.controller ================================== .. py:module:: wolfhece.assets.boxplot.controller .. autoapi-nested-parse:: 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 --------------- .. py:class:: 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) Persistent controller for editable boxplot assets. .. py:attribute:: series :type: list[list[float]] .. py:attribute:: canvas_origin_x .. py:attribute:: canvas_origin_y .. py:attribute:: canvas_size_w .. py:attribute:: canvas_size_h .. py:attribute:: area_fraction .. py:attribute:: id :value: '' .. py:attribute:: labels :type: list[str] | None .. py:attribute:: colors :type: list | None .. py:attribute:: whis .. py:attribute:: y_range_mode :value: 'auto' .. py:attribute:: y_min :type: float | None .. py:attribute:: y_max :type: float | None .. py:attribute:: box_width_fraction .. py:attribute:: show_mean :value: False .. py:attribute:: show_outliers :value: True .. py:attribute:: show_labels :value: True .. py:attribute:: show_area_frame :value: True .. py:attribute:: frame_color .. py:attribute:: border_color .. py:attribute:: median_color .. py:attribute:: legend_text_color .. py:attribute:: frame_line_width .. py:attribute:: box_line_width .. py:attribute:: whisker_line_width .. py:attribute:: median_line_width .. py:attribute:: mapviewer :value: None .. py:attribute:: editor :type: wolfhece.assets.boxplot.editor.BoxplotZonesEditor | None :value: None .. py:attribute:: zones :type: wolfhece.PyVertexvectors.Zones | None :value: None .. py:method:: _build_asset() -> wolfhece.assets.boxplot.zones_asset.BoxplotZonesAsset .. py:method:: update_canvas(x: float | None = None, y: float | None = None, width: float | None = None, height: float | None = None, rebuild: bool = True) -> None Update canvas position / size. .. py:method:: get_transform_bounds() -> tuple[float, float, float, float] Return editable asset bounds as ``(xmin, ymin, xmax, ymax)``. .. py:method:: apply_transform_bounds(bounds: tuple[float, float, float, float], *, rebuild: bool = True) -> None Apply rectangle bounds produced by map drag/resize handles. .. py:method:: update_data(series: Sequence[Sequence[float]] | None = None, labels: Sequence[str] | None = None, colors: Sequence[tuple] | None = None, rebuild: bool = True) -> None .. py:method:: rebuild(ToCheck: bool = True) -> wolfhece.PyVertexvectors.Zones Rebuild geometry from current parameters and update mapviewer. .. py:method:: _get_mapviewer_objects() -> list .. py:method:: _get_vector_draw_type() .. py:method:: _get_vector_by_id(obj_id: str) .. py:method:: _find_bound_zones_in_mapviewer() -> wolfhece.PyVertexvectors.Zones | None .. py:method:: _resolve_unique_id(preferred: str, exclude_obj=None) -> str .. py:method:: attach_to_mapviewer(mapviewer, id: str | None = None, ToCheck: bool = True) -> wolfhece.PyVertexvectors.Zones .. py:method:: show_editor(parent=None) .. py:method:: to_dict() -> dict .. py:method:: from_dict(data: dict) -> BoxplotZonesController :staticmethod: .. py:method:: save_json(path: str | pathlib.Path) -> None .. py:method:: load_json(path: str | pathlib.Path) -> BoxplotZonesController :staticmethod: