The behaviour of ipyvizzu can be changed with the following options.
By default ipyvizzu downloads Vizzu from jsDelivr CDN. It can be changed with the vizzu
constructor argument when you want to use a local copy of the library.
from ipyvizzu import Chart
chart = Chart(vizzu="./node_modules/vizzu/dist/vizzu.min.js")
ipyvizzu displays the generated Vizzu charts in a width="800px", height="480px"
div by default. This can be changed with the width
and the height
constructor arguments.
from ipyvizzu import Chart
chart = Chart(width="400px", height="240px")
ipyvizzu displays the chart animation steps after the currently running cell by default. This behaviour can be changed with the display
constructor argument.
begin
: displays all animation steps after the constructor's cellactual
(default): displays the actual animation step after the currently running cellend
: displays all animation steps after the last running cellmanual
: chart will not be displayed until show()
or _repr_html_()
method is called. Note: Chart cannot be modified after calling show()
or `repr_html().from ipyvizzu import Chart
# display chart immediately
chart1 = Chart() # Chart(display="begin") # Chart(display="actual") # Chart(display="end")
# chart.animate(...)
# chart.animate(...)
# display chart when show called
chart2 = Chart(display="manual")
# chart.animate(...)
# chart.animate(...)
chart2.show()
# display chart when _repr_html_ called
chart3 = Chart(display="manual")
# chart.animate(...)
# chart.animate(...)
chart3
ipyvizzu is able to scroll to the currently running animation. It can be set with the scroll_into_view
property.
Note: If manual scrolling is detected, ipyvizzu will not scroll automatically until the notebook is played again.
from ipyvizzu import Chart
chart = Chart()
chart.scroll_into_view = True
Back to the Table of contents