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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
capuace
Frequent Visitor

Having issues getting custom properties to populate

Hi. I've been working on a simple little visual to try and learn the ropes here and seem to keep running into problems getting the custom properties I define to populate the format pane. Any help with this issue would be appreciated!

 

Here's some code for context on my project:

 

capabilities.json objects:

 

 

"card": {
            "displayName": "Card Settings",
            "properties": {
                "titleText": {
                    "displayName": "Title Text",
                    "type": {
                        "text": true
                    }
                },
                "titleColor": {
                    "displayName": "Title Color",
                    "type": {
                        "fill": {
                            "solid": {
                                "color": true
                            }
                        }
                    }
                },
                "titleSize": {
                    "displayName": "Title Font Size",
                    "type": {
                        "integer": true
                    }
                },
                "contentColor": {
                    "displayName": "Content Color",
                    "type": {
                        "fill": {
                            "solid": {
                                "color": true
                            }
                        }
                    }
                },
                "contentSize": {
                    "displayName": "Content Font Size",
                    "type": {
                        "integer": true
                    }
                },
                "flashColor": {
                    "displayName": "Flash Color",
                    "type": {
                        "fill": {
                            "solid": {
                                "color": true
                            }
                        }
                    }
                },
                "flashType": {
                    "displayName": "Flash Type",
                    "type": {
                        "enumeration": [
                            {
                                "displayName": "None",
                                "value": "none"
                            },
                            {
                                "displayName": "Blip",
                                "value": "blip"
                            }
                        ]
                    }
                }
            }
        }

 

 

 

settings.ts:

 

 

export class CardSettings {
    public titleText: string = '';
    public titleColor: string = "#ffffff";
    public titleSize: number = 11;
    public contentColor: string = "#ffffff";
    public contentSize: number = 11;
    public flashColor: string = "#ffffff";
    public flashType: string = "none";
}

export class VisualSettings extends DataViewObjectsParser {
    public settings: CardSettings = new CardSettings();
}

 

 

 

and enumerateObjectInstances in visual.ts:

 

 

public enumerateObjectInstances(
        options: EnumerateVisualObjectInstanceOptions
    😞 VisualObjectInstance[] | VisualObjectInstanceEnumerationObject {
        console.log('enumerating...');
        return VisualSettings.enumerateObjectInstances(this.settings || VisualSettings.getDefault(), options);
    }

 

 

where this.settings = <VisualSettings>VisualSettings.parse(options.dataViews[0]) in update().

 

edit: made a mistake copying some code.

 

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @capuace

Your issue is this part of your code, in settings.ts:

export class VisualSettings extends DataViewObjectsParser {
    public settings: CardSettings = new CardSettings();
}

Try changing to:

export class VisualSettings extends DataViewObjectsParser {
    public card: CardSettings = new CardSettings();
}

The name of your class property needs to match the object name in your capabilities.json (you've defined as card in line 1 of your capabilities.json code) for it to enumerate correctly.

This also needs to be the same for your CardSettings properties, but these look OK 🙂

Good luck!

Daniel





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 @capuace

Your issue is this part of your code, in settings.ts:

export class VisualSettings extends DataViewObjectsParser {
    public settings: CardSettings = new CardSettings();
}

Try changing to:

export class VisualSettings extends DataViewObjectsParser {
    public card: CardSettings = new CardSettings();
}

The name of your class property needs to match the object name in your capabilities.json (you've defined as card in line 1 of your capabilities.json code) for it to enumerate correctly.

This also needs to be the same for your CardSettings properties, but these look OK 🙂

Good luck!

Daniel





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)




capuace
Frequent Visitor

That did it. Thanks so much!

Greg_Deckler
Community Champion
Community Champion

@Mike_Carlo @Seth_C_Bauer 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.