Initialization
Import
From ipyvizzu import Data, Config and Style and from ipyvizzu-story
import Story, Slide and Step:
from ipyvizzu import Data, Config, Style
from ipyvizzustory import Story, Slide, Step
Constructor
You need to put the Data object (described in the Data chapter)
into the Story constructor. You can not alter the data later but the data
being shown can be filtered at each step.
story = Story(data=data)
You can set the style used initally for the story as you can see in this example, and you can alter the style at each step within the story.
story = Story(data=data, style=Style({"title": {"fontSize": 50}}))
Tip
Check ipyvizzu - Color palette & fonts chapter and ipyvizzu - Chart layout chapter for more details on the available styling options.
Size
ipyvizzu-story tries to apply the ideal width and height for the story,
but you can also set them manually with the set_size method.
story.set_size(width="100%", height="400px")