Forum Discussion
Set default visual viewport size in custom visual
Is there a way to set the defaul viewport size when start a custom visual? Thanks.
Hi there,
It's currently not possible, but has been accepted onto the backlog. I'd suggest adding a vote to the idea and watching it for progress.
Regards,
Daniel
6 Replies
- dm-pSuper User
Hi there,
It's currently not possible, but has been accepted onto the backlog. I'd suggest adding a vote to the idea and watching it for progress.
Regards,
Daniel
- cboneill0099Helper I
Anyone know if there has been any movement on this? Looks like the idea was accepted a year ago.
- taghosMicrosoft Employee
Just wondering, if there has been an update on the same?
I want to set a fixed width and height by default for a custom visual I am developing. Currently in I try to do options.viewport.width=800 in say Visual's constructor or update method, it's not respecting it.
- dm-pSuper User
Hi taghos - there have been no new features added to the SDK for 9-10 months, so this is still not possible. The only manipulation of the viewport in the SDK is to maximise it to full screen mode by using switchFocusModeState on the visual host object.
Your best bet is to contact the custom visuals team - [email protected] - if you need a direct answer.
Regards,
Daniel
- taghosMicrosoft Employee
Yes, I followed up with [email protected] team and they confirmed that the viewport properties like width and height could not be set as of now.
Also, I have another related question -> Although we can't set the viewport properties but at any point we can get and read the values(width & height) as described here: https://microsoft.github.io/PowerBI-visuals/tutorials/building-react-based-custom-visual/receiving-props-from-powerbi-visual/. Just wanted to check if there is any variable corresponding to the transparency under Background? I just want to get the transparency value in % or fraction of the current window.