1
"""
2
Custom bokeh Markup models.
3
"""
4 6
from __future__ import absolute_import, division, unicode_literals
5

6 6
from bokeh.core.properties import Bool, Either, Int, Float, String
7 6
from bokeh.models.widgets import Markup
8

9

10 6
class HTML(Markup):
11
    """
12
    A bokeh model to render HTML markup including embedded script tags.
13
    """
14

15

16 6
class JSON(Markup):
17
    """
18
    A bokeh model that renders JSON as tree.
19
    """
20

21 6
    depth = Either(Int, Float, default=1, help="Depth to which the JSON tree is expanded.")
22

23 6
    hover_preview = Bool(default=False, help="Whether to show a hover preview for collapsed nodes.")
24

25 6
    theme = String(default='dark', help="Whether to expand all JSON nodes.")

Read our documentation on viewing source code .

Loading