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

Anaconda Enterprise: Documentation

# bokeh.models.widgets.markups

Various kinds of markup (static content) widgets.

class `bokeh.models.widgets.markups.` `Div`(**kwargs)

  Bases: `bokeh.models.widgets.markups.Markup`

  A block (div) of text.

  This Bokeh model corresponds to an HTML `<div>` element.

  Example

      from bokeh.io import output_file, show
      from bokeh.layouts import widgetbox
      from bokeh.models.widgets import Div

      output_file("div.html")

      div = Div(text="""Your <a href="https://en.wikipedia.org/wiki/HTML">HTML</a>-supported text is initialized with the <b>text</b> argument.  The
      remaining div arguments are <b>width</b> and <b>height</b>. For this example, those values
      are <i>200</i> and <i>100</i> respectively.""",
      width=200, height=100)

      show(widgetbox(div))

  `render_as_text`

    property type: `Bool`

    Whether the contents should be rendered as raw text or as interpreted HTML. The default value is `False`, meaning contents are rendered as HTML.

JSON Prototype

    {
      "css_classes": null,
      "disabled": false,
      "height": null,
      "id": "73676ea8-f19d-4c5f-8db4-6809807dc45b",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "render_as_text": false,
      "sizing_mode": "fixed",
      "style": {},
      "subscribed_events": [],
      "tags": [],
      "text": "",
      "width": null
    }

class `bokeh.models.widgets.markups.` `Markup`(**kwargs)

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

  Base class for Bokeh models that represent HTML markup elements.

  Markups include e.g., `<div>`, `<p>`, and `<pre>`.

  Note

  This is an abstract base class used to help organize the hierarchy of Bokeh model types. It is not useful to instantiate on its own.

  `style`

    property type: `Dict` ( `String` , `Any` )

    Raw CSS style declaration. Note this may be web browser dependent.

  `text`

    property type: `String`

    The contents of the widget.

JSON Prototype

    {
      "css_classes": null,
      "disabled": false,
      "height": null,
      "id": "91136b75-1aec-4260-8785-01442ac836a2",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "sizing_mode": "fixed",
      "style": {},
      "subscribed_events": [],
      "tags": [],
      "text": "",
      "width": null
    }

class `bokeh.models.widgets.markups.` `Paragraph`(**kwargs)

  Bases: `bokeh.models.widgets.markups.Markup`

  A block (paragraph) of text.

  This Bokeh model corresponds to an HTML `<p>` element.

  Example

      from bokeh.io import output_file, show
      from bokeh.layouts import widgetbox
      from bokeh.models.widgets import Paragraph

      output_file("div.html")

      p = Paragraph(text="""Your text is initialized with the 'text' argument.  The
      remaining Paragraph arguments are 'width' and 'height'. For this example, those values
      are 200 and 100 respectively.""",
      width=200, height=100)

      show(widgetbox(p))

JSON Prototype

    {
      "css_classes": null,
      "disabled": false,
      "height": null,
      "id": "ca784b2f-13ff-4ca7-8299-9c0619752e40",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "sizing_mode": "fixed",
      "style": {},
      "subscribed_events": [],
      "tags": [],
      "text": "",
      "width": null
    }

class `bokeh.models.widgets.markups.` `PreText`(**kwargs)

  Bases: `bokeh.models.widgets.markups.Paragraph`

  A block (paragraph) of pre-formatted text.

  This Bokeh model corresponds to an HTML `<pre>` element.

  Example

      from bokeh.io import output_file, show
      from bokeh.layouts import widgetbox
      from bokeh.models.widgets import PreText

      output_file("div.html")

      pre = PreText(text="""Your text is initialized with the 'text' argument.

      The remaining Paragraph arguments are 'width' and 'height'. For this example,
      those values are 500 and 100 respectively.""",
      width=500, height=100)

      show(widgetbox(pre))

JSON Prototype

    {
      "css_classes": null,
      "disabled": false,
      "height": null,
      "id": "a03e6fc0-2b32-49fa-80f8-a125d617e9d1",
      "js_event_callbacks": {},
      "js_property_callbacks": {},
      "name": null,
      "sizing_mode": "fixed",
      "style": {},
      "subscribed_events": [],
      "tags": [],
      "text": "",
      "width": null
    }