Skip to content



The features of ipyvizzu that are available in Flask are marked with a green check.

  • Change the url of Vizzu (vizzu)
  • Change the width of the Chart (width)
  • Change the height of the Chart (height)
  • Use scroll into view (scroll_into_view=True)

Display features:

  • Display all animations after _repr_html_ method called (display=DisplayTarget.MANUAL) *
  • Display all animations after show method called (display=DisplayTarget.MANUAL)
  • Automatically display all animations after the first cell (display=DisplayTarget.BEGIN)
  • Automatically display all animations after the currently running cell (display=DisplayTarget.ACTUAL)
  • Automatically display all animations after the last running cell (display=DisplayTarget.END)
  • Rerun any cell without rerun the first cell (display!=DisplayTarget.MANUAL)

Check Chart settings chapter for more details.

*you can display the Chart in other ways, see the sample below


Run the following command in your command line in order to install ipyvizzu (visit Installation chapter for more options and details).

pip install ipyvizzu pandas flask


Try ipyvizzu in Flask with the following sample.

# import flask, pandas and ipyvizzu

import pandas as pd
from ipyvizzu import Chart, Data, Config, Style, DisplayTarget

from flask import Flask, render_template

# initialize Chart

chart = Chart(
    width="640px", height="360px", display=DisplayTarget.MANUAL

# add data to Chart

data = Data()
df = pd.read_csv(


# add config to Chart

            "x": "Count",
            "y": "Sex",
            "label": "Count",
            "title": "Passengers of the Titanic",
            "x": ["Count", "Survived"],
            "label": ["Count", "Survived"],
            "color": "Survived",
chart.animate(Config({"x": "Count", "y": ["Sex", "Survived"]}))

# add style to Chart

chart.animate(Style({"title": {"fontSize": 35}}))

# display Chart

app = Flask(__name__)
html = chart._repr_html_()

def vizzu():
    return render_template("vizzu.html", mychart=html)

Place the above code blocks into a python file (for example called, create the html template (templates/vizzu.html) with the following content

<!DOCTYPE html>
  <div class="container">
   <iframe frameborder="0" height="480px" scrolling="no" src="data:text/html, {{ mychart }}" width="800px">

and run the following command in your command line in order to try it.

flask --app application run

Check the Tutorial for more info.