shyft.dashboard.time_series.view

Classes

BackgroundData(*, view_container, label, unit)

This object contains all data for background data patches

BaseView(*, view_container, label[, ...])

This object represents the immutable, hashable view base which can be used as dict keys

CircleScatter(*, view_container, color, ...)

This object contains all data for diamond view

DiamondScatter(*, view_container, color, ...)

This object contains all data for diamond view

FigureView(*, view_container, color, label, ...)

This is the base class of all figure views

FillInBetween(*, view_container, color, ...)

This object contains all data for fill in between view

LegendItem(*, view_container, label, views)

This object defines the data legend view

Line(*, view_container, color, label, unit, ...)

This object contains all data for line view

MultiLine(*, view_container, colors, labels, ...)

This object contains all data for a multiple-line view.

Scatter(*, view_container, color, label, ...)

This object contains all data for a scatter view

SquareScatter(*, view_container, color, ...)

This object contains all data for diamond view

TableView(*, view_container, label, unit[, ...])

This object defines the data for table view

TriangleScatter(*, view_container, color, ...)

This object contains all data for diamond view

Exceptions

exception shyft.dashboard.time_series.view.ViewError[source]

Bases: RuntimeError

class shyft.dashboard.time_series.view.BaseView(*, view_container, label, visible=True, tooltips=None)[source]

Bases: Hashable, Bindable, AttributeCallbackManager

This object represents the immutable, hashable view base which can be used as dict keys

Base class of all views, makes no sense to use it on its own.

Parameters:
  • view_container (view_container)

  • label (label of the view)

  • visible (visibility of the view)

  • tooltips (List[Tuple[str, str]] | None)

__init__(*, view_container, label, visible=True, tooltips=None)[source]

Base class of all views, makes no sense to use it on its own.

Parameters:
  • view_container (view_container)

  • label (label of the view)

  • visible (visibility of the view)

  • tooltips (List[Tuple[str, str]] | None)

Return type:

None

property view_container: shyft.dashboard.time_series.view_container.view_container_base.BaseViewContainer
class shyft.dashboard.time_series.view.LegendItem(*, view_container, label, views, expanded=None)[source]

Bases: BaseView

This object defines the data legend view

Legend Item to show in the given legend: view_container

Parameters:
  • view_container (Legend instance where to add this legend item)

  • label (label in the legend)

  • views (all views which are represented by this legend item (will be used to trigger visibility))

  • expanded (bool | None)

Notes

One view can be in several LegendItem s but this might lead to strange behaviour

__init__(*, view_container, label, views, expanded=None)[source]

Legend Item to show in the given legend: view_container

Parameters:
  • view_container (Legend instance where to add this legend item)

  • label (label in the legend)

  • views (all views which are represented by this legend item (will be used to trigger visibility))

  • expanded (bool | None)

Return type:

None

Notes

One view can be in several LegendItem s but this might lead to strange behaviour

class shyft.dashboard.time_series.view.TableView(*, view_container, label, unit, columns=None, visible=True)[source]

Bases: BaseView

This object defines the data for table view

View defining one or more colums in the provided table, view_container,

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.table.Table) – Figure view container where to plot the renderer of the view

  • label (str) – main label of the view

  • unit (str | Unit) – unit of the data in the columns

  • visible (bool) – controls the visibility of all columns

  • columns (Dict[int, str]) – Dict[index:int, column_label:str] defines all columns a la: index of the time series in the ts_vector to add column_label of the specific column

Notes

The following values can be changed from the outside during runtime:

  • visible

  • unit

Final column labels are combined from label + column_label.

__init__(*, view_container, label, unit, columns=None, visible=True)[source]

View defining one or more colums in the provided table, view_container,

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.table.Table) – Figure view container where to plot the renderer of the view

  • label (str) – main label of the view

  • unit (str | Unit) – unit of the data in the columns

  • visible (bool) – controls the visibility of all columns

  • columns (Dict[int, str]) – Dict[index:int, column_label:str] defines all columns a la: index of the time series in the ts_vector to add column_label of the specific column

Return type:

None

Notes

The following values can be changed from the outside during runtime:

  • visible

  • unit

Final column labels are combined from label + column_label.

class shyft.dashboard.time_series.view.FigureView(*, view_container, color, label, renderer_class, unit, no_y_rescaling=False, visible=True, y_axis=None, tooltips=None)[source]

Bases: BaseView

This is the base class of all figure views

Base class for figure views, makes no sens to initialize this class by it self

Parameters:
  • view_container (Figure view container where to plot the renderer of the view)

  • color (Color of the filling)

  • label (label of the view)

  • unit (unit of the data in the renderer)

  • no_y_rescaling (If data should be used for y axis rescaling)

  • visible (controls the visiblity of the renderer)

  • y_axis (defines on which YAxis the renderer should be plotted)

  • renderer_class (Type[BaseFigureRenderer])

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

  • color

  • label

  • unit

  • visible

__init__(*, view_container, color, label, renderer_class, unit, no_y_rescaling=False, visible=True, y_axis=None, tooltips=None)[source]

Base class for figure views, makes no sens to initialize this class by it self

Parameters:
  • view_container (Figure view container where to plot the renderer of the view)

  • color (Color of the filling)

  • label (label of the view)

  • unit (unit of the data in the renderer)

  • no_y_rescaling (If data should be used for y axis rescaling)

  • visible (controls the visiblity of the renderer)

  • y_axis (defines on which YAxis the renderer should be plotted)

  • renderer_class (Type[BaseFigureRenderer])

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

  • color

  • label

  • unit

  • visible

property renderer_class: Type[BaseFigureRenderer]
property y_axis: YAxis
class shyft.dashboard.time_series.view.Line(*, view_container, color, label, unit, index, no_y_rescaling=False, visible=True, y_axis=None, line_style='solid', line_width=2.0, tooltips=None)[source]

Bases: FigureView

This object contains all data for line view

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (Figure view container where to plot the renderer of the view)

  • color (color of the line)

  • label (label of the view)

  • unit (unit of the data in the renderer)

  • index (index defining the time series in the ts-vector)

  • no_y_rescaling (If data should be used for y axis rescaling)

  • visible (controls the visiblity of the renderer)

  • y_axis (defines on which YAxis the renderer should be plotted)

  • line_width (line width of the line)

  • line_style (str)

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible

__init__(*, view_container, color, label, unit, index, no_y_rescaling=False, visible=True, y_axis=None, line_style='solid', line_width=2.0, tooltips=None)[source]

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (Figure view container where to plot the renderer of the view)

  • color (color of the line)

  • label (label of the view)

  • unit (unit of the data in the renderer)

  • index (index defining the time series in the ts-vector)

  • no_y_rescaling (If data should be used for y axis rescaling)

  • visible (controls the visiblity of the renderer)

  • y_axis (defines on which YAxis the renderer should be plotted)

  • line_width (line width of the line)

  • line_style (str)

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible

property indices: List[int]

Enables using common calls to Line and MultiLine. Should be refactored eventually.

class shyft.dashboard.time_series.view.Scatter(*, view_container, color, label, unit, index, renderer_class, no_y_rescaling=False, visible=True, size=4, fill_color=None, fill_alpha=1.0, line_alpha=1.0, y_axis=None, tooltips=None)[source]

Bases: FigureView

This object contains all data for a scatter view

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • color (str) – color of the line

  • renderer_class (Type[DiamondScatterRenderer] | Type[CircleScatterRenderer] | Type[SquareScatterRenderer] | Type[TriangleScatterRenderer]) – defines which scatter it is going to be

  • fill_color (str) – fill_color of the scatter

  • fill_alpha (float) – alpha transparency of the scatter fill_color

  • line_alpha (float) – alpha transparency of the scatter line

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector

  • no_y_rescaling (bool | None) – If data should be used for y axis rescaling

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • size (int) – defines the size of the scatter

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible, size, fill_color, fill_alpha, line_alpha

__init__(*, view_container, color, label, unit, index, renderer_class, no_y_rescaling=False, visible=True, size=4, fill_color=None, fill_alpha=1.0, line_alpha=1.0, y_axis=None, tooltips=None)[source]

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • color (str) – color of the line

  • renderer_class (Type[DiamondScatterRenderer] | Type[CircleScatterRenderer] | Type[SquareScatterRenderer] | Type[TriangleScatterRenderer]) – defines which scatter it is going to be

  • fill_color (str) – fill_color of the scatter

  • fill_alpha (float) – alpha transparency of the scatter fill_color

  • line_alpha (float) – alpha transparency of the scatter line

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector

  • no_y_rescaling (bool | None) – If data should be used for y axis rescaling

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • size (int) – defines the size of the scatter

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible, size, fill_color, fill_alpha, line_alpha

property indices: List[int]

Enables using common calls as MultiLine. Should be refactored eventually.

class shyft.dashboard.time_series.view.DiamondScatter(*, view_container, color, label, unit, index, no_y_rescaling=False, visible=True, size=4, fill_color=None, fill_alpha=1.0, line_alpha=1.0, y_axis=None, tooltips=None)[source]

Bases: Scatter

This object contains all data for diamond view

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • color (str) – color of the line

  • fill_color (str) – fill_color of the scatter

  • fill_alpha (float) – alpha transparency of the scatter fill_color

  • line_alpha (float) – alpha transparency of the scatter line

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector

  • no_y_rescaling (bool | None) – If data should be used for y axis rescaling

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • size (int) – defines the size of the scatter

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible, size, fill_color, fill_alpha, line_alpha

__init__(*, view_container, color, label, unit, index, no_y_rescaling=False, visible=True, size=4, fill_color=None, fill_alpha=1.0, line_alpha=1.0, y_axis=None, tooltips=None)[source]

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • color (str) – color of the line

  • fill_color (str) – fill_color of the scatter

  • fill_alpha (float) – alpha transparency of the scatter fill_color

  • line_alpha (float) – alpha transparency of the scatter line

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector

  • no_y_rescaling (bool | None) – If data should be used for y axis rescaling

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • size (int) – defines the size of the scatter

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible, size, fill_color, fill_alpha, line_alpha

class shyft.dashboard.time_series.view.CircleScatter(*, view_container, color, label, unit, index, no_y_rescaling=False, visible=True, size=4, fill_color=None, fill_alpha=1.0, line_alpha=1.0, y_axis=None, tooltips=None)[source]

Bases: Scatter

This object contains all data for diamond view

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • color (str) – color of the line

  • fill_color (str) – fill_color of the scatter

  • fill_alpha (float) – alpha transparency of the scatter fill_color

  • line_alpha (float) – alpha transparency of the scatter line

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector

  • no_y_rescaling (bool | None) – If data should be used for y axis rescaling

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • size (int) – defines the size of the scatter

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible, size, fill_color, fill_alpha, line_alpha

__init__(*, view_container, color, label, unit, index, no_y_rescaling=False, visible=True, size=4, fill_color=None, fill_alpha=1.0, line_alpha=1.0, y_axis=None, tooltips=None)[source]

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • color (str) – color of the line

  • fill_color (str) – fill_color of the scatter

  • fill_alpha (float) – alpha transparency of the scatter fill_color

  • line_alpha (float) – alpha transparency of the scatter line

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector

  • no_y_rescaling (bool | None) – If data should be used for y axis rescaling

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • size (int) – defines the size of the scatter

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible, size, fill_color, fill_alpha, line_alpha

class shyft.dashboard.time_series.view.SquareScatter(*, view_container, color, label, unit, index, no_y_rescaling=False, visible=True, size=4, fill_color=None, fill_alpha=1.0, line_alpha=1.0, y_axis=None, tooltips=None)[source]

Bases: Scatter

This object contains all data for diamond view

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • color (str) – color of the line

  • fill_color (str) – fill_color of the scatter

  • fill_alpha (float) – alpha transparency of the scatter fill_color

  • line_alpha (float) – alpha transparency of the scatter line

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector

  • no_y_rescaling (bool | None) – If data should be used for y axis rescaling

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • size (int) – defines the size of the scatter

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible, size, fill_color, fill_alpha, line_alpha

__init__(*, view_container, color, label, unit, index, no_y_rescaling=False, visible=True, size=4, fill_color=None, fill_alpha=1.0, line_alpha=1.0, y_axis=None, tooltips=None)[source]

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • color (str) – color of the line

  • fill_color (str) – fill_color of the scatter

  • fill_alpha (float) – alpha transparency of the scatter fill_color

  • line_alpha (float) – alpha transparency of the scatter line

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector

  • no_y_rescaling (bool | None) – If data should be used for y axis rescaling

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • size (int) – defines the size of the scatter

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible, size, fill_color, fill_alpha, line_alpha

class shyft.dashboard.time_series.view.TriangleScatter(*, view_container, color, label, unit, index, no_y_rescaling=False, visible=True, size=4, fill_color=None, fill_alpha=1.0, line_alpha=1.0, y_axis=None, tooltips=None)[source]

Bases: Scatter

This object contains all data for diamond view

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • color (str) – color of the line

  • fill_color (str) – fill_color of the scatter

  • fill_alpha (float) – alpha transparency of the scatter fill_color

  • line_alpha (float) – alpha transparency of the scatter line

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector

  • no_y_rescaling (bool | None) – If data should be used for y axis rescaling

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • size (int) – defines the size of the scatter

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible, size, fill_color, fill_alpha, line_alpha

__init__(*, view_container, color, label, unit, index, no_y_rescaling=False, visible=True, size=4, fill_color=None, fill_alpha=1.0, line_alpha=1.0, y_axis=None, tooltips=None)[source]

Plots a line for a time series with the index in the ts-vector from the data source

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • color (str) – color of the line

  • fill_color (str) – fill_color of the scatter

  • fill_alpha (float) – alpha transparency of the scatter fill_color

  • line_alpha (float) – alpha transparency of the scatter line

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector

  • no_y_rescaling (bool | None) – If data should be used for y axis rescaling

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • size (int) – defines the size of the scatter

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible, size, fill_color, fill_alpha, line_alpha

class shyft.dashboard.time_series.view.FillInBetween(*, view_container, color, label, unit, indices, no_y_rescaling=False, visible=True, y_axis=None, fill_alpha=0.5, tooltips=None)[source]

Bases: FigureView

This object contains all data for fill in between view

Plots a filled patch between the data of two time series in the ts-vector from the data source

Parameters:
  • view_container (Figure view container where to plot the renderer of the view)

  • color (Color of the filling)

  • fill_alpha (defines the alpha value of the filling default is 0.5)

  • label (label of the view)

  • unit (unit of the data in the renderer)

  • indices (tuple with 2 indices defining the 2 time series in the ts-vector)

  • no_y_rescaling (If data should be used for y axis rescaling)

  • visible (controls the visiblity of the renderer)

  • y_axis (defines on which YAxis the renderer should be plotted)

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, fill_alpha, label, unit, indices, visible

__init__(*, view_container, color, label, unit, indices, no_y_rescaling=False, visible=True, y_axis=None, fill_alpha=0.5, tooltips=None)[source]

Plots a filled patch between the data of two time series in the ts-vector from the data source

Parameters:
  • view_container (Figure view container where to plot the renderer of the view)

  • color (Color of the filling)

  • fill_alpha (defines the alpha value of the filling default is 0.5)

  • label (label of the view)

  • unit (unit of the data in the renderer)

  • indices (tuple with 2 indices defining the 2 time series in the ts-vector)

  • no_y_rescaling (If data should be used for y axis rescaling)

  • visible (controls the visiblity of the renderer)

  • y_axis (defines on which YAxis the renderer should be plotted)

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, fill_alpha, label, unit, indices, visible

class shyft.dashboard.time_series.view.MultiLine(*, view_container, colors, labels, unit, indices=None, no_y_rescaling=False, visible=True, y_axis=None, line_styles=None, line_widths=None, expandable=False, tooltips=None)[source]

Bases: FigureView

This object contains all data for a multiple-line view.

Plots multiple lines for a time series with selected scenarios in the ts-vector from the data source

Parameters:
  • view_container (Figure view container where to plot the renderer of the view)

  • colors (color of the line)

  • labels (label of the view)

  • unit (unit of the data in the renderer)

  • indices (a list of indices defining the time series in the ts-vector)

  • no_y_rescaling (If data should be used for y axis rescaling)

  • visible (controls the visibility of the renderer)

  • y_axis (defines on which YAxis the renderer should be plotted)

  • expandable (bool | None)

  • line_styles (List[str])

  • line_widths (List[float])

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible

__init__(*, view_container, colors, labels, unit, indices=None, no_y_rescaling=False, visible=True, y_axis=None, line_styles=None, line_widths=None, expandable=False, tooltips=None)[source]

Plots multiple lines for a time series with selected scenarios in the ts-vector from the data source

Parameters:
  • view_container (Figure view container where to plot the renderer of the view)

  • colors (color of the line)

  • labels (label of the view)

  • unit (unit of the data in the renderer)

  • indices (a list of indices defining the time series in the ts-vector)

  • no_y_rescaling (If data should be used for y axis rescaling)

  • visible (controls the visibility of the renderer)

  • y_axis (defines on which YAxis the renderer should be plotted)

  • expandable (bool | None)

  • line_styles (List[str])

  • line_widths (List[float])

  • tooltips (List[Tuple[str, str]])

Notes

The following values can be changed from the outside during runtime:

color, label, unit, indices, visible

class shyft.dashboard.time_series.view.BackgroundData(*, view_container, label, unit, values_color_map=typing.Dict[int, str], default_color='white', index, visible=True, y_axis=None, fill_alpha=0.5, y_max=1000, y_min=-1000, show_not_defined=False)[source]

Bases: FigureView

This object contains all data for background data patches

Plots the data of a time series in the ts-vector from the data source as filled background patches. Values of the time series are mapped to colors using the values_color_map.

For now only a single value to color are supported. See also example.

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • fill_alpha (float) – defines the alpha value of the filling default is 0.5

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector from data source to plot

  • default_color (str) – The color everything not defined in color map should have, has only an effect if show_not_defined=True

  • show_not_defined (bool) – Show values not defined in the value_color_map with default_color

  • values_color_map – Defines the mapping from value to color to use

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • y_max (int) – value to use as max value for the y axis

  • y_min (int) – value to use as min value for the y axis

  • color

  • label

  • unit

  • index

  • visible

  • y_max

  • y_min

  • values_color_map

  • fill_alpha

  • show_not_defined

__init__(*, view_container, label, unit, values_color_map=typing.Dict[int, str], default_color='white', index, visible=True, y_axis=None, fill_alpha=0.5, y_max=1000, y_min=-1000, show_not_defined=False)[source]

Plots the data of a time series in the ts-vector from the data source as filled background patches. Values of the time series are mapped to colors using the values_color_map.

For now only a single value to color are supported. See also example.

Parameters:
  • view_container (shyft.dashboard.time_series.view_container.figure.Figure) – Figure view container where to plot the renderer of the view

  • fill_alpha (float) – defines the alpha value of the filling default is 0.5

  • label (str) – label of the view

  • unit (str | Unit) – unit of the data in the renderer

  • index (int) – index defining the time series in the ts-vector from data source to plot

  • default_color (str) – The color everything not defined in color map should have, has only an effect if show_not_defined=True

  • show_not_defined (bool) – Show values not defined in the value_color_map with default_color

  • values_color_map – Defines the mapping from value to color to use

  • visible (bool) – controls the visibility of the renderer

  • y_axis (YAxis | None) – defines on which YAxis the renderer should be plotted

  • y_max (int) – value to use as max value for the y axis

  • y_min (int) – value to use as min value for the y axis

  • color

  • label

  • unit

  • index

  • visible

  • y_max

  • y_min

  • values_color_map

  • fill_alpha

  • show_not_defined