Shimoku docs
Search…
Changing menu_path

Create and modify a menu_path in the same run

The menu_path can be modified. If the menu_path does not previously exist, it is created when the code is run.
More data can be added, and a different menu-path allow to register another chart of the same type. If the menu_path does not exist, it is created when you run the code.
data = [
{'date': dt.date(2021, 1, 1), 'x': 5, 'y': 10},
{'date': dt.date(2021, 1, 2), 'x': 6, 'y': 8},
{'date': dt.date(2021, 1, 3), 'x': 4, 'y': 10},
{'date': dt.date(2021, 1, 4), 'x': 7, 'y': 2},
{'date': dt.date(2021, 1, 5), 'x': 3, 'y': 14},
{'date': dt.date(2021, 1, 6), 'x': 6, 'y': 10},
{'date': dt.date(2021, 1, 7), 'x': 3, 'y': 12},
{'date': dt.date(2021, 1, 8), 'x': 8, 'y': 14},
]
shimoku.plt.bar(
data=data,
x='date', y=['x', 'y'],
menu_path='test/new-bar',
order=0,
)
A new menu_path is created on the run.
Copy link