Skip to main content

bokeh

Bokeh

from dara.components.plotting.bokeh.bokeh import Bokeh

class Bokeh(StyledComponentInstance)

A Bokeh Component allows for a bokeh figure to be added to your document. The component takes a single argument that should be the figure to display. The component takes care of serialization of the component using bokeh's Document class. A figure can only have 1 Document associated with it, so for this class to work you cannot have already associated the figure with a document (e.g. by calling show(figure)). If you need access to the Document then it is accessible as the document property of an instance of the Bokeh component. If you already have a document then you can instantiate the class with that, by passing it as the document argument to instantiate the class.

By default the component has a minimum height and width of 350px, this can be overwritten by passing the min_height and min_width props to the component.

Attributes

  • document: str
  • events: Optional[List[Tuple[str, Action]]]

Methods

__init__

def __init__(figure: Any = None,
document: Any = None,
theme: Optional[dict] = None,
events: Optional[List[Tuple[str, Action]]] = None,
**kwargs)

Arguments:

  • figure: the figure to display
  • document: the document to display