Explore Courses Blog Tutorials Interview Questions
0 votes
in BI by (17.6k points)
reshown by

I find it difficult to wrap my head around developing a PowerBI visual from scratch. I was reading wikiguide, inspecting examples, but still feel like there's a huge gap in understanding how it works internally - it did not 'click'. (I understand basics of how D3 works so not too worried about that part)


I hope I'm not asking too much, but could someone, using this barchart as an example, post a sequence of which methods in the visual source are called (and how the data is converted and passed) when:

  • The visual is added to the dashboard in PowerBI,

  • A category and a measure are assigned to the visual,

  • Data filter in PowerBI changes,

  • An element on our custom visual is selected.

  • Your option which you think may be relevant

I used this specific visual as an example because it was mentioned as meeting minimum requirements for contributing a new custom visual, which sounds like a good starting point, source:

New Visual Development

Please follow our minimum requirements for implementing a new visual. See the wiki here.

 (the link references the barchart tutorial)

However, if you have a better example visual - please use that instead.

This is all I got:

Many thanks in advance.

1 Answer

0 votes
by (47.2k points)
  • capablilites.json structure is used by power BI to determine

  • What should be the data pane(dataRoles) & how Power BI bind the data to your visual (dataViewMappings)

  • What shall be shown in formatting pane(like placeholders)

  • There is also an optional method used by PowerBI to initialize the formatting pane. i.e enumerateObjectInstances().Structure in capabilities.json file must be equal to the structure returned by this method.

  • When anything is changed related to the visual, update() method is called.

  • There is an internal method called visualTransform() which is not directly called by Power BI. In case of BarChart, it is called by the update() method so the arrow is correct. Most visuals have some kind of method and it is used to convert the Power BI DataView structure to the internal structure.

  • constructor and update() have parameters which provide callback mechanisms to Power BI like IselectionManager which alters the interaction of the visual with the rest of power BI visuals using

  • The structure of custom visuals interacting with Power BI hasn't changed that much since the beginning. Only with the new API the interaction and possibilities have changed. it used to be an open world, but now it is limited.

Browse Categories