wolfhece.assets.bar.distribution ================================ .. py:module:: wolfhece.assets.bar.distribution .. autoapi-nested-parse:: Distribution model for bar chart segment fractions. Computes normalized fractions from values, similar to pie distribution but tailored for consecutive bar segments. Module Contents --------------- .. py:class:: BarSegment One normalized bar segment definition. .. py:attribute:: value :type: float .. py:attribute:: fraction :type: float .. py:attribute:: start_position :type: float .. py:attribute:: end_position :type: float .. py:attribute:: label :type: str .. py:class:: BarDistributionModel(values: Sequence[float], labels: Sequence[str] | None = None) Compute and store normalized bar fractions from values. .. py:attribute:: _values .. py:attribute:: _fractions .. py:attribute:: _labels :type: list[str] :value: [] .. py:property:: values :type: numpy.ndarray .. py:property:: fractions :type: numpy.ndarray .. py:property:: labels :type: list[str] .. py:method:: set_values(values: Sequence[float], labels: Sequence[str] | None = None) -> None .. py:method:: segments() -> list[BarSegment] Compute bar segments with normalized positions.