add_button
add_button(
label,
dashboard_path,
page_id,
button_id,
height,
width,
x_position,
y_position,
z_position=6000,
tab_order=-1001,
fill_color='#3086C3',
alpha=0,
url_link=None,
page_navigation_link=None,
)
Add a button to a page
:param str label: The text you want to display inside the button. :param str dashboard_path: The path where the dashboard files are stored. (This is the top level directory containing the .pbip file and Report and SemanticModel folders). :param str page_id: The unique id for the page you want to add the background image to. If you used this package’s functions it will be in the format page1, page2, page3, page4, etc. If you manually created the page it will be a randomly generated UUID. To find a page’s page id, consult the report > definition> pages > page.json file and look in the page order list. :param str button_id: Please choose a unique id to use to identify the button. PBI defaults to using a UUID, but it’d probably be easier if you choose your own id.
:param int height: Height of text box on the page :param int width: Width of text box on the page
:param int x_position: The x coordinate of where you want to put the text box on the page. Origin is page’s top left corner. :param int y_position: The y coordinate of where you want to put the text box on the page. Origin is page’s top left corner. :param int z_position: The z index for the visual. (Larger number means more to the front, smaller number means more to the back). Defaults to 6000 :param int tab_order: 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)
:param int fill_color: Hex code for the background (fill) color you’d like to use for the button. Defaults to blue (#3086C3) :param int alpha: The transparency of the background image. Must be a whole integer between 1 and 100. Defaults to 0 (100% not transparent)
:param str url_link: Optional argument. If provided, the button will navigate to this URL. Should be a full, not relative url :param str page_navigation_link: Optional argument. If provided the button will navigate to this page in the report. Must be a valid page_id already present in the report.
This function creates a new button on a page.