bokeh.models.widgets.panels — Anaconda Enterprise 4.4 documentation

Anaconda Enterprise: Documentation

# bokeh.models.widgets.panels

Various kinds of panel widgets.

class `bokeh.models.widgets.panels.` `Panel`(**kwargs)

  Bases: `bokeh.models.widgets.widget.Widget`

  A single-widget container with title bar and controls.

  `child`

    property type: `Instance` ( `LayoutDOM` )

    The child widget. If you need more children, use a layout widget, e.g. `Row` or `Column`.

  `closable`

    property type: `Bool`

    Whether this panel is closeable or not. If True, an “x” button will appear.

  `title`

    property type: `String`

    An optional text title of the panel.

JSON Prototype

    {
      "child": null,
      "closable": false,
      "css_classes": null,
      "disabled": false,
      "height": null,
      "id": "45d5ad02-8436-4458-98b6-2bab6ece6081",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "sizing_mode": "fixed",
      "subscribed_events": [],
      "tags": [],
      "title": "",
      "width": null
    }

class `bokeh.models.widgets.panels.` `Tabs`(**kwargs)

  Bases: `bokeh.models.widgets.widget.Widget`

  A panel widget with navigation tabs.

  Example

      from bokeh.models.widgets import Panel, Tabs
      from bokeh.io import output_file, show
      from bokeh.plotting import figure

      output_file("slider.html")

      p1 = figure(plot_width=300, plot_height=300)
      p1.circle([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], size=20, color="navy", alpha=0.5)
      tab1 = Panel(child=p1, title="circle")

      p2 = figure(plot_width=300, plot_height=300)
      p2.line([1, 2, 3, 4, 5], [6, 7, 2, 4, 5], line_width=3, color="navy", alpha=0.5)
      tab2 = Panel(child=p2, title="line")

      tabs = Tabs(tabs=[ tab1, tab2 ])

      show(tabs)

  `active`

    property type: `Int`

    The index of the active tab.

  `callback`

    property type: `Instance` ( `Callback` )

    A callback to run in the browser whenever the button is activated.

  `tabs`

    property type: `List` ( `Instance` ( `Panel` ) )

    The list of child panel widgets.

JSON Prototype

    {
      "active": 0,
      "callback": null,
      "css_classes": null,
      "disabled": false,
      "height": null,
      "id": "faaaacdd-cbd3-4663-b52c-a6200c340cd2",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "sizing_mode": "fixed",
      "subscribed_events": [],
      "tabs": [],
      "tags": [],
      "width": null
    }