You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/powerbpy/shape.py
+17-10Lines changed: 17 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ def __init__(self,
26
26
fill_color_alpha,
27
27
#background_color,
28
28
#background_color_alpha,
29
+
border_color,
30
+
border_width,
29
31
tab_order,
30
32
z_position,
31
33
shape_rotation_angle=0,
@@ -35,31 +37,34 @@ def __init__(self,
35
37
36
38
Parameters
37
39
----------
40
+
visual_id: str
41
+
Please choose a unique id to use to identify the shape. PBI defaults to using a UUID, but it'd probably be easier if you choose your own id.
38
42
shape_type : str
39
-
The type of shape you want to put on the page. For example an arrow would be "arrow"
43
+
The type of shape you want to put on the page. For example an arrow would be "arrow".
40
44
shape_rotation_angle : str
41
45
The angle that you want to rotate the shape by. Defaults to 0, or no rotation.
42
46
fill_color : str
43
47
The hex code of the color that you want to use to fill the shape.
44
48
fill_color_alpha : int
45
49
The transparency of the fill color. Must be a whole integer between 1 and 100. Defaults to 0, (100% not transparent).
50
+
border_width : int
51
+
border_color : str
46
52
alt_text : str
47
53
Alternate text for the visualization can be provided as an argument. This is important for screen readers (accesibility) or if the visualization doesn't load properly.
48
-
chart_title_font_size: int
49
-
Font size for chart title
50
54
x_position : int
51
-
The x coordinate of where you want to put the chart on the page. Origin is page's top left corner.
55
+
The x coordinate of where you want to put the shape on the page. Origin is page's top left corner.
52
56
y_position : int
53
-
The y coordinate of where you want to put the chart on the page. Origin is page's top left corner.
57
+
The y coordinate of where you want to put the shape on the page. Origin is page's top left corner.
54
58
height : int
55
-
Height of chart on the page
59
+
Height of shape on the page
56
60
width : int
57
-
Width of chart on the page
61
+
Width of shape on the page
58
62
tab_order : int
59
63
The order which the screen reader reads different elements on the page. Defaults to -1001 for now. (I need to do more to figure out what the numbers correpond to. It should also be possible to create a function to automatically order this left to right top to bottom by looping through all the visuals on a page and comparing their x and y positions)
60
64
z_position : int
61
-
The z index for the visual. (Larger number means more to the front, smaller number means more to the back). Defaults to 6000
62
-
65
+
The z index for the visual. (Larger number means more to the front, smaller number means more to the back). Defaults to 6000.
66
+
parent_group_id : str
67
+
This should be a valid id code for another Power BI visual. If supplied the current visual will be nested inside the parent group.
0 commit comments