<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic assigning transparency in capabilities in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/assigning-transparency-in-capabilities/m-p/3376029#M43839</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I'm trying to customise the formatting pane of my visual.&lt;BR /&gt;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.&lt;BR /&gt;That's okay, however I've lost my mapping between what's on the formatting pane and what gets sent to my visual.&lt;BR /&gt;e.g. this is my capabilities code (excerpt)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"shading": {
            "displayName": "Triangular Shading",
            "properties": {
                "show":{
                    "displayName": "Show Shading",
                    "type":{
                        "bool": true
                    }
                },
                "transparency": {
                    "displayName": "Transparency",
                    "type": {
                        "numeric": true
                    }
                }
            }
        },&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;whereas this is my code where I populate my capabilities:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there's of course more code related to saving this setting and using it, but in general my problem is this:&lt;BR /&gt;-&amp;gt; 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.&lt;BR /&gt;Clearly it's because "transparency" is somehow special, but how can I use it?&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2023 09:48:25 GMT</pubDate>
    <dc:creator>matthias_vc</dc:creator>
    <dc:date>2023-08-11T09:48:25Z</dc:date>
    <item>
      <title>assigning transparency in capabilities</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/assigning-transparency-in-capabilities/m-p/3376029#M43839</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I'm trying to customise the formatting pane of my visual.&lt;BR /&gt;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.&lt;BR /&gt;That's okay, however I've lost my mapping between what's on the formatting pane and what gets sent to my visual.&lt;BR /&gt;e.g. this is my capabilities code (excerpt)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"shading": {
            "displayName": "Triangular Shading",
            "properties": {
                "show":{
                    "displayName": "Show Shading",
                    "type":{
                        "bool": true
                    }
                },
                "transparency": {
                    "displayName": "Transparency",
                    "type": {
                        "numeric": true
                    }
                }
            }
        },&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;whereas this is my code where I populate my capabilities:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there's of course more code related to saving this setting and using it, but in general my problem is this:&lt;BR /&gt;-&amp;gt; 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.&lt;BR /&gt;Clearly it's because "transparency" is somehow special, but how can I use it?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 09:48:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/assigning-transparency-in-capabilities/m-p/3376029#M43839</guid>
      <dc:creator>matthias_vc</dc:creator>
      <dc:date>2023-08-11T09:48:25Z</dc:date>
    </item>
  </channel>
</rss>

