Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
c-duff
Frequent Visitor

Can you use StructuralTypeDescriptor's without capabilities.json?

When making a Custom Visual: in the documentation about objects and properties (https://docs.microsoft.com/en-gb/power-bi/developer/visuals/objects-properties) it specifys that the "type" is either a ValueTypeDescriptor or a StructuralTypeDescriptor.

However, in schema.capabilities.json, even in the latest API version, (v2.6.0) only fill and fillRule are allowed.

If I try and add another type like "image" into my capabilities.json, I get the error "Invalid capabilities" when I try to build the visual.

 

Is there any way to use the other StructuralTypeDescriptor's from PowerBI-visuals.d.ts ? "image" and "geoJson" types in particular would be useful.

I can make-do with a series of custom string properties, but it makes more sense to use the existing interfaces.

 

Thanks!

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @c-duff,

Unfortunately not - if the capabilities.json does not validate against the prescribed schema, then you'll run into these issues and the visual just won't build.

For now, the workarounds you're specifying (string properties and parsing them to the desired types on enumeration, and back when update) are the way to go, but I agree this would be a useful addition to the user experience. Perhaps you can create an enhancement request for it?

Another alternative would be to consider using advanced edit mode (EDIT: correct link) to build a UI component for these properties specifically for the end user, and handle the read/write from the capabilities accordingly. The d3.js visual does something like this (albeit with text boxes, but could be modified to use other widgets):

Regards,

Daniel


If my post helps, then please consider accepting as a solution to help other forum members find the answer more quickly 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

3 REPLIES 3
dm-p
Super User
Super User

Hi @c-duff,

Unfortunately not - if the capabilities.json does not validate against the prescribed schema, then you'll run into these issues and the visual just won't build.

For now, the workarounds you're specifying (string properties and parsing them to the desired types on enumeration, and back when update) are the way to go, but I agree this would be a useful addition to the user experience. Perhaps you can create an enhancement request for it?

Another alternative would be to consider using advanced edit mode (EDIT: correct link) to build a UI component for these properties specifically for the end user, and handle the read/write from the capabilities accordingly. The d3.js visual does something like this (albeit with text boxes, but could be modified to use other widgets):

Regards,

Daniel


If my post helps, then please consider accepting as a solution to help other forum members find the answer more quickly 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




c-duff
Frequent Visitor

Thanks @dm-p !

I thought that might be the case. Advanced edit mode is new to me, I was doing the same thing with a boolean property, but advanced edit mode is taylor made for this kind of thing.

FYI, I think you linked to the wrong page for advanced edit mode. Here is the documentation for those that follow.

 

Thanks @c-duff  for pointing out the incorrect URL - looks like copy/paste wasn't working too well on that one! Have edited the solution post to indicate that the URL has been corrected 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.