Forum Discussion

Rodi123's avatar
Rodi123
Helper I
1 year ago
Solved

Responsive button for Matrix diagrams

Hi there, Does anyone know how to make a matrix diagram with one single button responsive to the width of a contrainer (Visual)? I don't think the option is there, but maybe there is another wa...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Rodi123 ,

    Please refers to the following steps.

    There are two visuals in the example, the table and the card.

    Select the table, go to the Format pane, and turn off "Auto-size width".



    Enable the "Power BI Project(.pbib) save option" in the "Options" menu.

     

    Create a new folder and save the report as .pbip.
    Go to the .pbip folder where these files are stored and open the .Report folder.

    Open the "visuals" folder using VS CODE.

    There are two entries in the left directory under visuals, corresponding to the two visual objects.
    Checking the visual.json of the first item indicates that the item is a table visual.


    You can do CTRL + F to find the 'columnWidth' property. The 'Value' attribute is the width of the column.


    You can set all columns to the same width as the longest width column. Then, save the changes.

     

    Then, open the PBIP file and view it in Powe BI Desktop. All columns in the table should now be the same width.


    Best Regards,
    Dengliang Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.