HTML Content - Custom Visual for Power BI
Properties Reference
Properties Reference
Content Formatting
The Content Formatting menu can be used to manage some aspects of the visual's appearance to the end-user.
Show Raw HTML
By default, the visual will attempt to render any content in the Values data role. However, if you want to check the generated HTML, you can enable this to confirm everything is as intended, e.g.:
Allow Opening URLs
Custom visuals are prevented from directly opening hyperlinks or external URLs on behalf of the user, as this is potentially malicious behaviour if done without any visible effect.
However, custom visuals can request that Power BI open a URL on their behalf.
Enabling the Allow Opening URLs property will delegate the request to open the hyperlink to Power BI. If permitted, this will prompt the user for their consent to navigate to this URL, e.g.:
- Only
http://
andhttps://
protocols are supported for custom visuals. This means that other protocols, such asjavascript:
,ftp://
,mailto:
,file://
will result in an error, e.g.:
"No Data" Message
This property will be available in version 1.1.0 and will allow you to customize what's displayed if your visual has columns or measures assigned, but Power BI does not have any data to provide.
Please refer to the Change Log for details on how you will be able to leverage this functionality when it arrives.
Default Font Family
This property will apply the specified font-family
to the visual's body, if there is no overriding styling applied to the HTML content - either in an an element's inline style
attribute, or in a <style>
tag if using one of those in your expressions.
Default Font Size
This property will apply the specified font-size
to the visual's body, if there is no overriding styling applied to the HTML content - either in an an element's inline style
attribute, or in a <style>
tag if using one of those in your expressions.
Default Font Color
This property will apply the specified color
to the visual's body, if there is no overriding styling applied to the HTML content - either in an an element's inline style
attribute, or in a <style>
tag if using one of those in your expressions.
Default Text Alignment
This property will apply the specified text-align
to the visual's body, if there is no overriding styling applied to the HTML content - either in an an element's inline style
attribute, or in a <style>
tag if using one of those in your expressions.