<?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 Re: VisualObjectInstanceEnumerationObject formatting pane shows blank displayName in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-formatting-pane-shows/m-p/1311986#M3317</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;, I got the same feedback from Microsoft, but hadn't been able to find the github issue you mentioned. It's a little puzzling that pbiviz scaffolds this interface into all new projects if it isn't usable by the api flagged for custom visuals and isn't ready for prime time.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Aug 2020 17:08:19 GMT</pubDate>
    <dc:creator>john_m_dixon</dc:creator>
    <dc:date>2020-08-20T17:08:19Z</dc:date>
    <item>
      <title>VisualObjectInstanceEnumerationObject formatting pane shows blank displayName</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-formatting-pane-shows/m-p/1303284#M3313</link>
      <description>&lt;P&gt;Using API v3.2.0 and have also tried v2.6.0 for this issue.&lt;/P&gt;&lt;P&gt;I'm attempting to use&amp;nbsp;VisualObjectInstanceEnumerationObject to do categorized formatting options similar to the Table visual's Field formatting object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="fieldFormatting.png" style="width: 235px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/335441i870E734D87FEE129/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fieldFormatting.png" alt="fieldFormatting.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am succesfully populating the VisualObjectInstanceEnumerationObject object, and am seeing results populated in the formatting pane for each of my containers, which are bound to to categories in a categorical dataview mapping. I can use the dropdown to switch between containers, and the results are bound to the dataview as expected. My issue is that the text of the dropdown for each category is blank for every option. See relevant code below (this is a contrived example but is representative of the issue):&lt;/P&gt;&lt;P&gt;capabilities.json&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "dataRoles": [
        {
            "displayName": "Category",
            "name": "category",
            "kind": "Grouping"
        },
        {
            "displayName": "Measure",
            "name": "measure",
            "kind": "Measure"
        }
    ],
    "objects": {
        "polygons": {
            "displayName": "Polygons",
            "properties": {
                "polyFill" :{
                    "displayName": "Polygon Color",
                    "type": {
                        "fill": {
                            "solid": {
                                "color": true
                            }
                        }
                    }
                }
            }
        }
    }
    "dataViewMappings": [
        {
            "categorical": {
                "categories": {
                    "for": {
                        "in": "category"
                    },
                },
                "values": {
                    "select": [
                        {
                            "bind": {
                                "to": "measure"
                            }
                        }
                    ]
                }
            }
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dataview conversion&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    public convert(): dataPoint[]{
        const categorical = this._options.dataViews[0].categorical;

        const categories: DataViewCategoryColumn[] = categorical.categories;
        const values: DataViewValueColumns = categorical.values;

        const category = categories[dataRoleHelper.getCategoryIndexOfRole(categories, 'category')];
        const value = values.find(d =&amp;gt; dataRoleHelper.hasRoleInValueColumn(d, 'measure'));

        const data: dataPoint[] = [];
        const scaleColor = d3.scaleOrdinal(d3.schemeSet3);
        
        for (let i = 0; i &amp;lt; category.values.length; i++){
            data.push({
                xValue : &amp;lt;number&amp;gt;category.values[i],
                yValue: &amp;lt;number&amp;gt;value.values[i],
                selectionId: this.host.createSelectionIdBuilder().withCategory(category, i).createSelectionId(),
                color: scaleColor(i.toString())
            });
        }

        return data;
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;enumerateObjectInstances&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    public enumerateObjectInstances(options: EnumerateVisualObjectInstancesOptions): VisualObjectInstance[] | VisualObjectInstanceEnumerationObject {
        let instances: VisualObjectInstance[] | VisualObjectInstanceEnumerationObject =
            (&amp;lt;VisualObjectInstanceEnumerationObject&amp;gt;VisualSettings.enumerateObjectInstances(this.settings, options)).instances || [];

        switch (options.objectName) {
            case 'polygons': {
                if (this.visualData) {
                    instances = {
                        containers: this.visualData.map(d =&amp;gt; { return { displayName: `${d.xValue}, ${d.yValue}` } }),
                        instances: this.visualData.map((d, i) =&amp;gt; {
                            return {
                                containerIdx: i,
                                objectName: "polygons",
                                displayName: `${d.xValue}, ${d.yValue}`,
                                properties: {
                                    polyFill: { solid: { color: d.color } }
                                },
                                selector: d.selectionId.getSelector()
                            }
                        })
                    };
                }
                break;
            }
        }

        return instances;
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="blankDisplayName.png" style="width: 173px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/335440i0C2E8D66B1CEA4AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="blankDisplayName.png" alt="blankDisplayName.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The type of displayName is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    export type DisplayNameGetter = ((resourceProvider: IStringResourceProvider) =&amp;gt; string) | string;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to set the value of displayName to a function that takes an IStringResourceProvider and return my chosen container name as a string. I have also tried to use the get(id: string) method of IStringResourceProvider, passing in the chosen string name as the id. If there is a significance of the id parameter of the get method, then I've been unable to determine it.&lt;/P&gt;&lt;P&gt;I debugged the execution of the Table visual and can see that it simply passes the displayName of the container as a string as I appear to be doing. Not sure what the difference is (maybe different API for first party visuals?).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="tableVisualDisplayName.png" style="width: 356px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/335442i1C04EBD8281B48E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tableVisualDisplayName.png" alt="tableVisualDisplayName.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/17823"&gt;@v-viig&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/112988"&gt;@v-evelk&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/2762"&gt;@jamesdales&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 08:09:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-formatting-pane-shows/m-p/1303284#M3313</guid>
      <dc:creator>john_m_dixon</dc:creator>
      <dc:date>2020-08-18T08:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: VisualObjectInstanceEnumerationObject formatting pane shows blank displayName</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-formatting-pane-shows/m-p/1309420#M3315</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/75222"&gt;@john_m_dixon&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Your approach is correct, but &lt;A href="https://github.com/microsoft/PowerBI-visuals-tools/issues/283" target="_self"&gt;unfortunately containers don't work properly for custom visuals&lt;/A&gt;. It's somewhat frustrating, particularly as the MS-produced ones seem to work (although they have the same issue if you build them locally). I recently asked the team on its status and it's still outstanding.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 03:35:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-formatting-pane-shows/m-p/1309420#M3315</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2020-08-20T03:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: VisualObjectInstanceEnumerationObject formatting pane shows blank displayName</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-formatting-pane-shows/m-p/1311986#M3317</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;, I got the same feedback from Microsoft, but hadn't been able to find the github issue you mentioned. It's a little puzzling that pbiviz scaffolds this interface into all new projects if it isn't usable by the api flagged for custom visuals and isn't ready for prime time.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 17:08:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-formatting-pane-shows/m-p/1311986#M3317</guid>
      <dc:creator>john_m_dixon</dc:creator>
      <dc:date>2020-08-20T17:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: VisualObjectInstanceEnumerationObject formatting pane shows blank displayName</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-formatting-pane-shows/m-p/1919728#M3768</link>
      <description>&lt;P&gt;This approach seems to work in custom visuals now (using API 3.5.1).&amp;nbsp;&lt;/P&gt;&lt;P&gt;But how do I determine which value was selected in the combo box when I read the changed object? I can't seem to access the containerIdx in the metadata or elsewhere in the VisualUpdateOptions.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 10:11:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-formatting-pane-shows/m-p/1919728#M3768</guid>
      <dc:creator>WouterBo</dc:creator>
      <dc:date>2021-06-24T10:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: VisualObjectInstanceEnumerationObject formatting pane shows blank displayName</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-formatting-pane-shows/m-p/2599714#M4629</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;BR /&gt;Any progress with finding&amp;nbsp;&lt;SPAN&gt;containerIdx&amp;nbsp;to track what is exactly changed. (... or dropdown selected value, or container instance, or anything to solve property mapping when containers and slectors used)&amp;nbsp; ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 07:28:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/VisualObjectInstanceEnumerationObject-formatting-pane-shows/m-p/2599714#M4629</guid>
      <dc:creator>vgerya</dc:creator>
      <dc:date>2022-06-24T07:28:54Z</dc:date>
    </item>
  </channel>
</rss>

