Forum Discussion

Solle's avatar
Solle
Helper III
4 years ago
Solved

SVG image position

Hi All,  I have an issue related to my SVG imported icon - I have the below code and I am showing the SVG by using the HTML viewer add-in, in PowerBI.      SVG = "<svg xmlns='http://www.w3.org...
  • dm-p's avatar
    4 years ago

    Hi Solle,

    The container used to host any custom visual has a small amount of padding that we don't have access to, as it sits above the main body of the visual in the DOM.

    If it's he HTML Content visual you're using, it applies a generic scroller over the content, which is pushing the height over in this case. It may be easier to just keep the container size a little bigger, but you can style out the scrollbar handle in this case using the measure-based stylesheet property and assigning via conditional formatting, but it still may scroll if the user clicks on the visual and uses their mouse wheel. 

    Note that the property is broken in the new-style formatting pane and you will need to revert to the old version to access. This is an issue for all custom visuals utilising conditional formatting in this manner and Microsoft should be deploying a fix in the next major version of Power BI Desktop.

    The measure you can create for the CSS is as follows:

     

    CSS = ".os-scrollbar {
        visibility: hidden;
    }"

     

    Assign this via the property and the scrollbar handle will no longer display, e.g.:

    Regards,

    Daniel