Skip to content

Commit f898892

Browse files
committed
4 equal height vertical stacked example in doc string
1 parent 85d7549 commit f898892

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

plotly/dashboard_objs/dashboard_objs.py

+20-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class Dashboard(dict):
161161
`.get_box()` returns the box located in the dashboard by calling
162162
its box id as displayed via `.get_preview()`.
163163
164-
Example: Create a simple Dashboard object
164+
Example 1: Create a simple Dashboard object
165165
```
166166
import plotly.dashboard_objs as dashboard
167167
@@ -198,6 +198,25 @@ class Dashboard(dict):
198198
my_dboard.remove(1)
199199
# my_dboard.get_preview()
200200
```
201+
202+
Example 2: 4 vertical boxes of equal height
203+
```
204+
import plotly.dashboard_objs as dashboard
205+
206+
box_1 = {
207+
'type': 'box',
208+
'boxType': 'plot',
209+
'fileId': 'username:some#',
210+
'title': 'box 1'
211+
}
212+
213+
my_dboard = dashboard.Dashboard()
214+
my_dboard.insert(box_1)
215+
my_dboard.insert(box_1, 'below', 1)
216+
my_dboard.insert(box_1, 'below', 1)
217+
my_dboard.insert(box_1, 'below', 3)
218+
# my_dboard.get_preview()
219+
```
201220
"""
202221
def __init__(self, content=None):
203222
if content is None:

0 commit comments

Comments
 (0)