shyft.dashboard.time_series.axes
Classes
|
This Object represents actual y axis for a Figure class |
|
This object represents the y axis definition |
|
Exceptions
- class shyft.dashboard.time_series.axes.YAxisSide(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
- LEFT = 'left'
- RIGHT = 'right'
- class shyft.dashboard.time_series.axes.YAxis(*, label: str, unit: str | Unit, color: str = 'black', side: YAxisSide = YAxisSide.LEFT, default_y_range: Tuple[float, float] | None = None, dynamic_unit_prefix: bool = False, auto_unit_change: bool = True)[source]
Bases:
Hashable
,Bindable
,AttributeCallbackManager
This object represents the y axis definition
- __init__(*, label: str, unit: str | Unit, color: str = 'black', side: YAxisSide = YAxisSide.LEFT, default_y_range: Tuple[float, float] | None = None, dynamic_unit_prefix: bool = False, auto_unit_change: bool = True) None [source]
Representation of a y-axis for a figure.
- Parameters:
label (y axis lable)
unit (unit of the axis)
color (color of the axis incl. tixs and numbers)
side (YAxisSide either YAxisSide.LEFT or YAxisSide.RIGHT)
default_y_range (set the default range to use if no renderer on axis)
dynamic_unit_prefix (NOT IN USE, used dynamic axis scaling)
auto_unit_change (allow that the figure changes the axis units if the axis is empty)
- property default_y_range: Tuple[float, float]
- property dynamic_unit_prefix: bool
- class shyft.dashboard.time_series.axes.FigureYAxis(*, axis: YAxis, unit_registry: UnitRegistry, bokeh_axis: LinearAxis | None = None, y_axis_format: str | None = None, logger: Logger | None = None)[source]
Bases:
Bindable
This Object represents actual y axis for a Figure class
- __init__(*, axis: YAxis, unit_registry: UnitRegistry, bokeh_axis: LinearAxis | None = None, y_axis_format: str | None = None, logger: Logger | None = None) None [source]
Figure Y Axis for the figure view container
- Parameters:
axis (YAxis object which to represent)
unit_registry (unit registry to use for unit converison)
bokeh_axis (bokeh axis to use)
- color_callback(obj, attr, old_value, new_value) None [source]
This function sets the color for the bokeh axis
- static unit_view_format(unit: str | Unit) str [source]
This function converts the Unit of the y axis
- property uid: str
This function returns the uid of the axis_view, used to identify this axis
- property side: str
This function returns the side of the axis
- set_y_range(start: float, end: float) None [source]
This function sets the axis range to start and end
- check_axis_dimensions(attr, old, new) None [source]
This function checks if y range has changed enough order of magnitude to trigger unit change