<?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: Unable to add formatting options for custom visual in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Unable-to-add-formatting-options-for-custom-visual/m-p/3500195#M8205</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/395600"&gt;@kpia&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Capabilities are added to tell Power BI what objects and properties your visual will want to persist to the report for later retrieval. However, to display them for the user, you will need to write the necessary code to do so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code will typically include classes that match the structure of your capabilities (a class instance for each object and each class has to have properties with default values instantiated) and suitable logic to handle things that are not defined in the capabilities, such as enabling/disabling other properties based on what you choose in others or performing validation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/objects-properties?tabs=getFormattingModel" target="_self"&gt;The Objects and Properties page&lt;/A&gt; in the developer documentation &lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/objects-properties?tabs=getFormattingModel#formatting-pane" target="_self"&gt;has a section&lt;/A&gt; that details how to get started with the code necessary for populating the formatting pane. Suppose you've created a brand new visual using powerbi-visuals-tools. In that case, there is usually a &lt;FONT face="courier new,courier"&gt;VisualSettings.ts&lt;/FONT&gt; (or similar file) that is generated, showing the necessary structure needed to match the capabilities that are generated from the template, and this may help you to get started.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
    <pubDate>Fri, 27 Oct 2023 00:20:49 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2023-10-27T00:20:49Z</dc:date>
    <item>
      <title>Unable to add formatting options for custom visual</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Unable-to-add-formatting-options-for-custom-visual/m-p/3499991#M8203</link>
      <description>&lt;P&gt;I am creating a cusotm visual and want to add some formatting options. I've followed the guide in the custom visual documentation. As I understand it, if I add objects to the capabilities file it should show up in the formatting panel. Below is my code, I'm not sure why it doens't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any insight is greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "dataRoles": [
        {
            "displayName": "Date",
            "name": "categories",
            "kind": "Grouping",
            "description": "Add a date-type column"
        },
        {
            "displayName": "Max Date Column",
            "name": "max date",
            "kind": "Grouping",
            "description": "Add column that contains max date"
        }
    ],
    "objects": {
        "general": {
            "displayName": "General",
            "displayNameKey": "formattingGeneral",
            "properties": {
                "filter": {
                    "type": {
                        "filter": true
                    }
                },
                "selfFilter": {
                    "type": {
                        "filter": {
                            "selfFilter": true
                        }
                    }
                }
            }
        },
        "buttonTypes": {
            "displayName": "BoB Buttons",
            "displayNameKey": "Visual_Buttons",
            "properties": {
                "show": {
                    "displayName": "Show",
                    "displayNameKey": "Visual_Show",
                    "type": {
                        "bool": true
                    }
                }
            }
        }
    },
    "dataViewMappings": [
        {
            "conditions": [
                {
                    "categories": {
                        "max": 1
                    }
                }
            ],
            "categorical": {
                "categories": {
                    "select": [
                        {
                            "for": {
                                "in": "categories"
                            }
                        }
                    ],
                    "dataReductionAlgorithm": {
                        "window": {
                            "count": 30000
                        }
                    }
                }
            }
        }
    ],
    "privileges": [],
    "supportsHighlight": true,
    "supportsLandingPage": true,
    "suppressDefaultTitle": true,
    "supportsSynchronizingFilterState": true,
    "supportsKeyboardFocus": true
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 21:55:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Unable-to-add-formatting-options-for-custom-visual/m-p/3499991#M8203</guid>
      <dc:creator>kpia</dc:creator>
      <dc:date>2023-10-26T21:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to add formatting options for custom visual</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Unable-to-add-formatting-options-for-custom-visual/m-p/3500195#M8205</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/395600"&gt;@kpia&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Capabilities are added to tell Power BI what objects and properties your visual will want to persist to the report for later retrieval. However, to display them for the user, you will need to write the necessary code to do so.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code will typically include classes that match the structure of your capabilities (a class instance for each object and each class has to have properties with default values instantiated) and suitable logic to handle things that are not defined in the capabilities, such as enabling/disabling other properties based on what you choose in others or performing validation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/objects-properties?tabs=getFormattingModel" target="_self"&gt;The Objects and Properties page&lt;/A&gt; in the developer documentation &lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/objects-properties?tabs=getFormattingModel#formatting-pane" target="_self"&gt;has a section&lt;/A&gt; that details how to get started with the code necessary for populating the formatting pane. Suppose you've created a brand new visual using powerbi-visuals-tools. In that case, there is usually a &lt;FONT face="courier new,courier"&gt;VisualSettings.ts&lt;/FONT&gt; (or similar file) that is generated, showing the necessary structure needed to match the capabilities that are generated from the template, and this may help you to get started.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 00:20:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Unable-to-add-formatting-options-for-custom-visual/m-p/3500195#M8205</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2023-10-27T00:20:49Z</dc:date>
    </item>
  </channel>
</rss>

