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
Pumayk26
Frequent Visitor

Custom visual formating not showing in power bi

I have added objects value as below. But these options not appearing in power bi

"objects": {
        "circle": {
            "displayName": "Circle",
            "properties": {
                "circleColor": {
                    "displayName": "Color",
                    "description": "The fill color of the circle.",
                    "type": {
                        "fill": {
                            "solid": {
                                "color": true
                            }
                        }
                    }
                },
                "circleThickness": {
                    "displayName": "Thickness",
                    "description": "The circle thickness.",
                    "type": {
                        "numeric": true
                    }
                }
            }
        }
    }
1 REPLY 1
dm-p
Super User
Super User

Hi @Pumayk26,

If you're adding objects, you also need code to instantiate them when enumerateObjectInstances runs in your visual's workflow. What this translates to is:

  1. You need a class defining the object properties
    • Property names must exactly match those in capabilities.json
    • Properties must be instantiated with a suitable default value, even if it's null
  2. Instantiating that class as a property of your VisualSettings (and that name must exactly match the object key from capabilities.json)

So, based on your supplied JSON and assuming you've started from a blank visual, the following code in settings.ts (or wherever you're storing your VisualSettings class) would work under the same assumptions:

"use strict";

import { dataViewObjectsParser } from "powerbi-visuals-utils-dataviewutils";
import DataViewObjectsParser = dataViewObjectsParser.DataViewObjectsParser;

export class VisualSettings extends DataViewObjectsParser {
  public circle: CircleSettings = new CircleSettings();
}

export class CircleSettings {
  public circleColor: string = 'FF0000';
  public circleThickness: number = 2; 
}

now, when your visual fires up it will render them in the properties pane, e.g.:

image.png

For further reading, you can refer to the documentation on objects and properties.

Hopefully this is all you need. 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)




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.