Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I need to edit visual interaction with Power BI JavaScript SDK as you would do it with Power BI desktop.
I have checked almost all parts of the JavaScript SDK wiki but could not find any solution or workarounds. This Power BI API is supposed to be pretty complete so I am surprised we can't set this using it.
Thanks in advance for any the support
Hi @power_tanna
Did you try to use Power BI Embedded Playground to check what interactions are available? It was very helpful in my case.
Eugene.
Checked in Playground as well, nothing in-there same as wiki. We were looking for a way to embed this slicer with histogram : https://exceleratorbi.com.au/slicer-with-histogram-in-power-bi/
It requires to edit interaction of the visual, this is why we need to find a way to use API with embedding to change such setting.
Hi @Marco57
As I understood from the example, you need to place two separate controls, one of which is Slicer for numbers, and another one is column chart. In this case you need to create a report with these two elements and then embed whole page (you may hide filter pane and tab pane if you wish)
Then, you apply slicer values, in the way described on the playground: Sample Report -> Interact -> Filters and Slicers -> Set slicer state.
Eugene.
Hi @Eugene_Ov ,
Issue is that you also need to edit interaction of one of those histograms (there are actually two of them , one above the other and one of them needs it interaction with the slicer to be removed).
In my case, with Power BI API, I need to create those histogram/slicers dynamically (add multiple ones ) based on what the user is doing in my web application. Meaning I need a mean to also set the visual interaction to None and the API looks like having nothing for this.
Thanks for your support Eugene.
You can achieve that by turnin Authoring mode on. This is again applicable only for report embedding (not for single visual). When switched to authoring mode, you're good to go with almost any modifications on visuals. I managed to control visual type (switch from one chart type to another).
Have you checked Quick Visual Creator demo on the playground? The code looks pretty easy to read. See Playground -> Showcase -> Quick visual creator -> Get code
Eugene.
Same as you, I was excited by the amount of things you could do from Embedding. I am embedding a report.
I checked all properties of a visual and I find nothing about visual interaction unless there is a workaround or it is called differently in the API :
https://github.com/microsoft/powerbi-report-authoring/wiki/Properties
You can change a lot of things, but can't understand why interactions are not part of it.
For the Data binding as well, nothing about interaction inside of it:
https://github.com/microsoft/powerbi-report-authoring/wiki/Data-binding
Marc.
Sorry Marco, I didn't understand your point from the very beginning. I've checked available options in object model and didn't find any capabilities either. However, this functionality is available on Power BI Service and I think it's somewhere near to Embedded. It could happen that with the new Playground they'll expand the list of supported features.
New Power BI Embedded developers playground - Power Platform Release Plan | Microsoft Docs
Eugene
Many thanks for your researches Eugene ! Will have to be patient then, to apply the trick explained in the link of the histogram + slicer, I will also need to be able to edit the field start and end of the visual as you can see below:
From what I also see, it is not a property available today right? In case you can easely confirm otherwise that's ok.
Many thanks again Eugene for all the efforts.
User | Count |
---|---|
15 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
18 | |
11 | |
5 | |
4 | |
3 |