@@ -377,7 +377,6 @@ def get_preview(self):
377
377
378
378
# determine the specs for resulting two box split
379
379
if is_horizontal :
380
- print 'is horizontal'
381
380
new_top_left_x = top_left_x
382
381
new_top_left_y = top_left_y
383
382
new_box_w = box_w * (fill_percent / 100. )
@@ -388,7 +387,6 @@ def get_preview(self):
388
387
new_box_w_2 = box_w * ((100 - fill_percent ) / 100. )
389
388
new_box_h_2 = box_h
390
389
else :
391
- print 'is vertical'
392
390
new_top_left_x = top_left_x
393
391
new_top_left_y = top_left_y
394
392
new_box_w = box_w
@@ -440,11 +438,14 @@ def insert(self, box, side='above', box_id=None, fill_percent=50):
440
438
'left', and 'right'.
441
439
:param (int) box_id: the box id which is used as the reference box for
442
440
the insertion of the box.
443
- :param (float) fill_percent: specifies the percentage of the box area
444
- which the new box is occupying. The default is `fill_percent=50`
445
- which splits the region into two equally sized pieces with `box`
446
- and the box corresponding to `box_id` in this area of the layout.
447
-
441
+ :param (float) fill_percent: specifies the percentage of the container
442
+ box from the given 'side' that the new box occupies. For example
443
+ if you apply the method\n
444
+ .insert(box=new_box, box_id=2, side='left', fill_percent=20)\n
445
+ to a dashboard object, a new box is inserted 20% from the left side
446
+ of the box with id #2. Run .get_preview() to see the box ids
447
+ assigned to each box in the dashboard layout.
448
+ Default = 50
448
449
Example:
449
450
```
450
451
import plotly.dashboard_objs as dashboard
@@ -461,7 +462,7 @@ def insert(self, box, side='above', box_id=None, fill_percent=50):
461
462
my_dboard.insert(box_1, 'left', 1)
462
463
my_dboard.insert(box_1, 'below', 2)
463
464
my_dboard.insert(box_1, 'right', 3)
464
- my_dboard.insert(box_1, 'above', 4)
465
+ my_dboard.insert(box_1, 'above', 4, fill_percent=30 )
465
466
466
467
my_dboard.get_preview()
467
468
```
0 commit comments