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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
matthias_vc
Frequent Visitor

assigning transparency in capabilities

Hi,
I'm trying to customise the formatting pane of my visual.
When adding "transparency" I noted that it shows differently than if I add "transparency1". So I guess it's some keyword PowerBI identifies as something to display differently.
That's okay, however I've lost my mapping between what's on the formatting pane and what gets sent to my visual.
e.g. this is my capabilities code (excerpt)

 

"shading": {
            "displayName": "Triangular Shading",
            "properties": {
                "show":{
                    "displayName": "Show Shading",
                    "type":{
                        "bool": true
                    }
                },
                "transparency": {
                    "displayName": "Transparency",
                    "type": {
                        "numeric": true
                    }
                }
            }
        },

 

whereas this is my code where I populate my capabilities:

 

export function enumerateMSTAInstances(options: EnumerateVisualObjectInstancesOptions, visual:Visual): VisualObjectInstanceEnumeration {
    let objectName = options.objectName;
    let objectEnumeration: VisualObjectInstance[] = [];

    if (!visual.mstaSettings) {
        console.log("early abortion")
        return objectEnumeration;
    }
    const staticSelector: powerbi.data.Selector = {};
    let Categories = options;
    switch (objectName) {
    ...
        case 'shading':
            objectEnumeration.push({
                objectName: objectName,
                properties: {
                    show: visual.mstaSettings.shading.show,
                    transparency:visual.mstaSettings.shading.transparency
                },
                selector: staticSelector
            });
            break;
    };
    return objectEnumeration;
}

 

there's of course more code related to saving this setting and using it, but in general my problem is this:
-> If I change all occurences of "transparency" to "transparencyTest" it works (but shows a regular Number Slicer). If I change all those occurences back from "transparencyTest" to "transparency" it doesn't work anymore.
Clearly it's because "transparency" is somehow special, but how can I use it?

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.