microsoft / PowerBI-visuals-tools

Contains tools for building/packaging Power BI visuals
https://www.powerbi.com
MIT License
330 stars 148 forks source link

API Dialog box #504

Closed IgorVolod closed 6 months ago

IgorVolod commented 7 months ago

Hi all! API Dialog box... The question here: https://community.fabric.microsoft.com/t5/Custom-Visuals-Ideas/Provide-ability-to-control-viewport-property-through-code-Custom/idc-p/622655#M293 Nikita Grachev: Please use Dialog Box API to place your components... Fig2

  1. There is no way to set the style for the button. There is no option to remove a button.
  2. There is no option to delete.
  3. There is no possibility to change. A designer designs my visual. I cannot deviate from a design project. What should I do?

Thanks in advance for your answer.

AleksSavelev commented 7 months ago

Hi @IgorVolod, Unfortunately, all of this are not supported yet. We are aware of the request for this feature and hope to see it implemented in the future.

IgorVolod commented 7 months ago

Fine! Are there any other options to achieve the desired result? I need to implement a slicer and a datepicker.

AleksSavelev commented 7 months ago

Could you, please, describe it more specific? You can implement both of it inside of your visual.

IgorVolod commented 7 months ago

The “datepicker” is located between interactive elements. In the center, there is a date selection field. There is no way to place a large visual element. The user opens the calendar by clicking it. fig3

AleksSavelev commented 7 months ago

Is it right, that you have a date selection field inside of your visual and you want to display a date picker on click? If so, you can handle it without dialog box, since it displays over all interface, but it's not required in your case. You can simply add a div block that contains picker and display it over your interactive elements inside of the visual.

IgorVolod commented 7 months ago

Hi Alex! No, the date picker field, and the slicer that excludes field nulls in the hierarchical structure, is a separate visual. They are required in most dashboards and should be universal. In addition, I have not seen a description of the technique for embedding visuals from the standard collection into your own visual. As far as I understand the concept, this is impossible, isn't it?

AleksSavelev commented 6 months ago

Hi @IgorVolod, You're right it's not possible.

So, in your case, I see two ways:

  1. Use API Dialog box, but there're no options to customize those styles (as you described in the original message)
  2. Implement data picker inside of separate visual, but it'll be available only inside of the visual's viewport

Unfortunately, both of these methods will not satisfy your requirements, but these are the limitations of PowerBI.