Skip to content



The features of ipyvizzu-story that are available in Databricks are marked with a green check.

  • Display the created Story (play method)
  • Display the created Story (_repr_html_ method)
  • Use fullscreen
  • Use navigation buttons
  • Set width/height of the Story *
  • Export the Story into a html file
  • Get the html Story as a string


Live example

Open in Databricks


Place the following code into a notebook cell in order to install ipyvizzu-story (visit Installation chapter for more options and details).

!pip install ipyvizzu-story[jupyter]


Try ipyvizzu-story in Databricks with the following sample.

# import ipyvizzu and ipyvizzu-story

from ipyvizzu import Data, Config
from ipyvizzustory import Slide, Step

from ipyvizzustory import Story  # or

# from ipyvizzustory.env.ipy.story import Story

# create data and initialize Story with the created data

data = Data()
data.add_series("Foo", ["Alice", "Bob", "Ted"])
data.add_series("Bar", [15, 32, 12])
data.add_series("Baz", [5, 3, 2])

# you can also add data with pandas

# import pandas as pd
# data = Data()
# df = pd.read_csv(
#     ""
# )
# data.add_df(df)

story = Story(data=data)

# create Slides and Steps and add them to the Story

slide1 = Slide(
        Config({"x": "Foo", "y": "Bar"}),

slide2 = Slide(
        Config({"color": "Foo", "x": "Baz", "geometry": "circle"}),

# note: in Databricks,
# you need to set the width and height (CSS style)

story.set_size(width="800px", height="480px")

# you can export the Story into a html file

# `databricks_unique_id` is your id which can be found after `?o=` in the url)
databricks_unique_id = "000000000000000"
html_file = "mystory.html"


dbutils.fs.cp(f"file:/{html_file}", f"dbfs:/FileStore/{html_file}")
    f'<a href="/files/{html_file}/?o={databricks_unique_id}"'
    + " "
    + "download>Download HTML</a>"

# or you can get the html Story as a string

html = story.to_html()

# you can display the Story with the `play` method

# or you can also use the `_repr_html_` method.

# story

Check the Tutorial for more info.