<?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 Formatting pane: line alignment in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Formatting-pane-line-alignment/m-p/3668268#M8845</link>
    <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am upgrading my custom visuals from 2.6 to 5.3 - a massive leap in one go. One thing I can't get to work is the Alignment Group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Within&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;class DataPointCardSettings extends FormattingSettingsCard {&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    labelAlignment = new formattingSettings.AlignmentGroup({
        name: "labelAlignment",
        displayName: "Label alignment",
        mode: powerbi.visuals.AlignmentGroupMode.Horizonal,
        value: { value: "right" }
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't compile. I get the error: Type {value:string} is not assignable to type "string".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried true / false, I have tried blank, but no joy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using settings.ts, because I am modifying and copying code into the circleCard example. The example I have found online appears to change the code in visual.ts only:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/format-pane" target="_blank" rel="noopener"&gt;Customize the format pane in Power BI custom visuals - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I still use both settings.ts and visual.ts, or should I just be using visual.ts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code below (taken from the link above) implies you can assign a string of "right" to value. Any ideas? Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VizDataLtd_0-1706619868340.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1034149iB0A1C3445EA76974/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VizDataLtd_0-1706619868340.png" alt="VizDataLtd_0-1706619868340.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jan 2024 13:11:48 GMT</pubDate>
    <dc:creator>VizDataLtd</dc:creator>
    <dc:date>2024-01-30T13:11:48Z</dc:date>
    <item>
      <title>Formatting pane: line alignment</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Formatting-pane-line-alignment/m-p/3668268#M8845</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am upgrading my custom visuals from 2.6 to 5.3 - a massive leap in one go. One thing I can't get to work is the Alignment Group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Within&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;class DataPointCardSettings extends FormattingSettingsCard {&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    labelAlignment = new formattingSettings.AlignmentGroup({
        name: "labelAlignment",
        displayName: "Label alignment",
        mode: powerbi.visuals.AlignmentGroupMode.Horizonal,
        value: { value: "right" }
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't compile. I get the error: Type {value:string} is not assignable to type "string".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried true / false, I have tried blank, but no joy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using settings.ts, because I am modifying and copying code into the circleCard example. The example I have found online appears to change the code in visual.ts only:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/developer/visuals/format-pane" target="_blank" rel="noopener"&gt;Customize the format pane in Power BI custom visuals - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I still use both settings.ts and visual.ts, or should I just be using visual.ts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code below (taken from the link above) implies you can assign a string of "right" to value. Any ideas? Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VizDataLtd_0-1706619868340.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1034149iB0A1C3445EA76974/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VizDataLtd_0-1706619868340.png" alt="VizDataLtd_0-1706619868340.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 13:11:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Formatting-pane-line-alignment/m-p/3668268#M8845</guid>
      <dc:creator>VizDataLtd</dc:creator>
      <dc:date>2024-01-30T13:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting pane: line alignment</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Formatting-pane-line-alignment/m-p/3668966#M8853</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/679652"&gt;@VizDataLtd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't tried implementing the alignment settings in formatting cards yet, but from looking at the error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;Type {value:string} is not assignable to type "string"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This suggests assigning a string to the value property, not an object. Your reference example shows this, too. I would try amending as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;    labelAlignment = new formattingSettings.AlignmentGroup({
        name: "labelAlignment",
        displayName: "Label alignment",
        mode: powerbi.visuals.AlignmentGroupMode.Horizonal,
        value: "right"   // string rather than object
    });&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2024 20:43:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Formatting-pane-line-alignment/m-p/3668966#M8853</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2024-01-30T20:43:41Z</dc:date>
    </item>
  </channel>
</rss>

