nannyml.plots.components.figure module

class nannyml.plots.components.figure.Figure(title: str, x_axis_title: str, y_axis_title: str, y_axis_limit: List | None = None, metric_style: str = 'step', subplot_args: Dict[str, Any] | None = None, **kwargs)[source]

Bases: Figure

Extending the Plotly Figure class functionality.

Creates a new Figure.

SUPPORTED_METRIC_STYLES = ['step']
add_alert(data: ndarray | Series, name: str, color: str = Colors.RED_IMPERIAL, indices: ndarray | Series | None = None, start_dates: ndarray | Series | None = None, end_dates: ndarray | Series | None = None, subplot_args: Dict[str, Any] | None = None, **kwargs)[source]
add_confidence_band(upper_confidence_boundaries, lower_confidence_boundaries, name, indices=None, start_dates=None, end_dates=None, color=Colors.RED_IMPERIAL, with_additional_endpoint: bool = False, subplot_args: Dict[str, Any] | None = None, **kwargs)[source]
add_metric(data: ndarray | Series, name: str, color: str, indices: ndarray | Series | None = None, start_dates: ndarray | Series | None = None, end_dates: ndarray | Series | None = None, hover: Hover | None = None, subplot_args: Dict[str, Any] | None = None, **kwargs)[source]
add_period_separator(x, color=Colors.BLUE_SKY_CRAYOLA, subplot_args: Dict[str, Any] | None = None, **kwargs)[source]
add_threshold(data, name, indices=None, start_dates=None, end_dates=None, color=Colors.RED_IMPERIAL, with_additional_endpoint: bool = False, subplot_args: Dict[str, Any] | None = None, **kwargs)[source]