<?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: [Custom Visual] How to get toggle on formatting settings card? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-toggle-on-formatting-settings-card/m-p/3833930#M51734</link>
    <description>&lt;P&gt;try as below&lt;/P&gt;&lt;P&gt;in the settings.ts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;/**
 * Legend Formatting Card
 */
class LegendCardSettings extends FormattingSettingsCard {
    show = new formattingSettings.ToggleSwitch({
        name: "show",
        displayName: undefined,
        value: false,
    });

    fill = new formattingSettings.ColorPicker({
        name: "fill",
        displayName: "Color",
        value: { value: "#000000" }
    });
    
    topLevelSlice = this.show;
    name: string = "legenda";
    displayName: string = "Legenda";
    slices = [this.fill];
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the capabilities.json&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"legenda": {
			"properties": {
			  "show": {
				"type": {
				  "bool": true
				}
			  },
			  "fill": {
				"type": {
				  "fill": {
					"solid": {
					  "color": true
					}
				  }
				}
			  }
			}
		  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2024 12:31:06 GMT</pubDate>
    <dc:creator>gdelpuenteCinec</dc:creator>
    <dc:date>2024-04-12T12:31:06Z</dc:date>
    <item>
      <title>[Custom Visual] How to get toggle on formatting settings card?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-toggle-on-formatting-settings-card/m-p/3556232#M45510</link>
      <description>&lt;P&gt;I am trying to get a toggle switch on one of the cards in my pbiviz custom visual like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joop_h_1-1701166436528.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1003188i3AD5DA79D9251886/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joop_h_1-1701166436528.png" alt="joop_h_1-1701166436528.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;According to the few articles I can find on the matter, I should be able to do this by using the reserved name "show"in the capabilities.json file. An example of this aproach can be found here:&lt;BR /&gt;&lt;A href="https://www.cloudfronts.com/blog/power-bi/pbiviz-single-line-toggle-format-option-tip/" target="_blank" rel="noopener"&gt;PBIVIZ Single Line Toggle Format Option Tip - CloudFronts&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I have not been able to accomplish the same. I have followed the exact steps layed out in the article, but to no avail. Here you can see the capabilities.json, and settings.ts files:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joop_h_2-1701166611366.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1003193i7339F3652F9368A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joop_h_2-1701166611366.png" alt="joop_h_2-1701166611366.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joop_h_3-1701166637219.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1003194iCECAEC702121DE60/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joop_h_3-1701166637219.png" alt="joop_h_3-1701166637219.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I suspect that the correct way of doing this has been changed in one of the pbiviz API updates (I am using the latest version), but I cant find anything about this in the documentation. I have also tried looking at the opensource custom visuals provided by Microsoft, but cant find a solution to my problem there, either.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can somebody help me solve this? In short, I want to know how to build a toggle switch next to the settings card,&amp;nbsp;&lt;STRONG&gt;not next to the settings slice&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 10:21:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-toggle-on-formatting-settings-card/m-p/3556232#M45510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-28T10:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: [Custom Visual] How to get toggle on formatting settings card?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-toggle-on-formatting-settings-card/m-p/3673633#M49268</link>
      <description>&lt;P&gt;Were you able to figure this out? I also can't find this anywhere. There's plenty of pictures of it in documentation, but no examples of actual code implementations anywhere...&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 17:47:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-toggle-on-formatting-settings-card/m-p/3673633#M49268</guid>
      <dc:creator>RandomUsername9</dc:creator>
      <dc:date>2024-02-01T17:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: [Custom Visual] How to get toggle on formatting settings card?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-toggle-on-formatting-settings-card/m-p/3833930#M51734</link>
      <description>&lt;P&gt;try as below&lt;/P&gt;&lt;P&gt;in the settings.ts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;/**
 * Legend Formatting Card
 */
class LegendCardSettings extends FormattingSettingsCard {
    show = new formattingSettings.ToggleSwitch({
        name: "show",
        displayName: undefined,
        value: false,
    });

    fill = new formattingSettings.ColorPicker({
        name: "fill",
        displayName: "Color",
        value: { value: "#000000" }
    });
    
    topLevelSlice = this.show;
    name: string = "legenda";
    displayName: string = "Legenda";
    slices = [this.fill];
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the capabilities.json&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"legenda": {
			"properties": {
			  "show": {
				"type": {
				  "bool": true
				}
			  },
			  "fill": {
				"type": {
				  "fill": {
					"solid": {
					  "color": true
					}
				  }
				}
			  }
			}
		  }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 12:31:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visual-How-to-get-toggle-on-formatting-settings-card/m-p/3833930#M51734</guid>
      <dc:creator>gdelpuenteCinec</dc:creator>
      <dc:date>2024-04-12T12:31:06Z</dc:date>
    </item>
  </channel>
</rss>

