<?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: Deneb: How to set a minimum width with dynamic step sizing? in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-How-to-set-a-minimum-width-with-dynamic-step-sizing/m-p/4853215#M12866</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/202311"&gt;@BeaBF&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thanks for the reply.&lt;BR /&gt;Option 1: I tried this approach, and it works fine when there are only a few categories on the x-axis. However, when more items are included, the visual tries to fit everything in, which compresses the bars and makes them unreadable. I need to make it dynamic for both conditions.&lt;/P&gt;&lt;P&gt;Option 2:&amp;nbsp; It’s supported only in Vega. I need to use Vega-Lite since I’m using this visual to apply pattern fills.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really appreciate your help and suggestions.&lt;/P&gt;</description>
    <pubDate>Sat, 18 Oct 2025 05:56:27 GMT</pubDate>
    <dc:creator>Abhijith19</dc:creator>
    <dc:date>2025-10-18T05:56:27Z</dc:date>
    <item>
      <title>Deneb: How to set a minimum width with dynamic step sizing?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-How-to-set-a-minimum-width-with-dynamic-step-sizing/m-p/4838493#M12839</link>
      <description>&lt;P&gt;I’m using a Deneb visual to display the number of tickets across different venues as a bar chart. The number of venues varies depending on the filter selection.&lt;/P&gt;&lt;P&gt;Currently, I’m using "width": { "step": 70 } so that the chart adjusts dynamically with the number of venues. This works fine when there are many venues, since the chart shows a horizontal scrollbar as expected.&lt;/P&gt;&lt;P&gt;However, when only a small number of venues are selected (for example, just 1 or 2), the chart becomes very narrow and leaves a large amount of white space on the right-hand side.&lt;/P&gt;&lt;P&gt;Is there a way to set a minimum width for the visual (or another approach) so that it doesn’t shrink too much when only a few categories are selected?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 04:01:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-How-to-set-a-minimum-width-with-dynamic-step-sizing/m-p/4838493#M12839</guid>
      <dc:creator>Abhijith19</dc:creator>
      <dc:date>2025-09-30T04:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Deneb: How to set a minimum width with dynamic step sizing?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-How-to-set-a-minimum-width-with-dynamic-step-sizing/m-p/4838804#M12840</link>
      <description>&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1364560"&gt;@Abhijith19&lt;/a&gt;&amp;nbsp;Hi!&lt;/FONT&gt;&lt;/P&gt;
&lt;H3 data-start="607" data-end="673"&gt;&lt;FONT color="#000000"&gt;Option 1: Use container width and let Vega-Lite fill space&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;"width": "container"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;This tells the chart to always fill the width of the Deneb visual.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 data-start="943" data-end="1007"&gt;&lt;FONT color="#000000"&gt;Option 2: Use a calculated width with step and a minimum&lt;/FONT&gt;&lt;/H3&gt;
&lt;H3 data-start="943" data-end="1007"&gt;&lt;FONT color="#000000"&gt;If you want both scrollbars and a minimum width, you can compute it in a signal (requires Vega, not just Vega-Lite). In Deneb, you can switch to a Vega spec:&lt;/FONT&gt;&lt;/H3&gt;
&lt;P data-start="1008" data-end="1173"&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;"width"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt; &lt;SPAN&gt;"signal"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"max(availableWidth, 70 * domain('x').length)"&lt;/SPAN&gt; &lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV dir="ltr"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;UL data-start="1260" data-end="1480"&gt;
&lt;LI data-start="1260" data-end="1323"&gt;
&lt;P data-start="1262" data-end="1323"&gt;&lt;FONT color="#000000"&gt;domain('x').length → number of categories in your x-axis.&lt;/FONT&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="1324" data-end="1361"&gt;
&lt;P data-start="1326" data-end="1361"&gt;&lt;FONT color="#000000"&gt;70 * … → your step-based width.&lt;/FONT&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="1362" data-end="1412"&gt;
&lt;P data-start="1364" data-end="1412"&gt;&lt;FONT color="#000000"&gt;max(availableWidth, …) → enforces a minimum.&lt;/FONT&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="1413" data-end="1480"&gt;
&lt;P data-start="1415" data-end="1480"&gt;&lt;FONT color="#000000"&gt;In Deneb, availableWidth corresponds to the actual visual size.&lt;/FONT&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;BBF&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV style="font-family: Segoe UI, sans-serif; font-size: 14px; line-height: 1.2;"&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt; &lt;STRONG&gt;Did I answer your question?&lt;/STRONG&gt; Mark my post as a solution! &lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; Kudos are appreciated &lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":fire:"&gt;🔥&lt;/span&gt; Proud to be a Super User!&lt;/STRONG&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Community News image 1920X1080.png" style="width: 150px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1238084iB989B7DAABABDDDF/image-size/large?v=v2&amp;amp;px=999" width="150" role="button" title="Community News image 1920X1080.png" alt="Community News image 1920X1080.png" /&gt;&lt;/span&gt; &lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 08:47:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-How-to-set-a-minimum-width-with-dynamic-step-sizing/m-p/4838804#M12840</guid>
      <dc:creator>BeaBF</dc:creator>
      <dc:date>2025-09-30T08:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Deneb: How to set a minimum width with dynamic step sizing?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-How-to-set-a-minimum-width-with-dynamic-step-sizing/m-p/4853215#M12866</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/202311"&gt;@BeaBF&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thanks for the reply.&lt;BR /&gt;Option 1: I tried this approach, and it works fine when there are only a few categories on the x-axis. However, when more items are included, the visual tries to fit everything in, which compresses the bars and makes them unreadable. I need to make it dynamic for both conditions.&lt;/P&gt;&lt;P&gt;Option 2:&amp;nbsp; It’s supported only in Vega. I need to use Vega-Lite since I’m using this visual to apply pattern fills.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really appreciate your help and suggestions.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Oct 2025 05:56:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-How-to-set-a-minimum-width-with-dynamic-step-sizing/m-p/4853215#M12866</guid>
      <dc:creator>Abhijith19</dc:creator>
      <dc:date>2025-10-18T05:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Deneb: How to set a minimum width with dynamic step sizing?</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-How-to-set-a-minimum-width-with-dynamic-step-sizing/m-p/4853789#M12869</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1364560"&gt;@Abhijith19&lt;/a&gt;&amp;nbsp;Hi!&amp;nbsp;&lt;/P&gt;
&lt;P data-start="595" data-end="752"&gt;You can combine width: "container" with the x.band and x.paddingInner properties to make the bars stay readable even when you have many categories.&lt;/P&gt;
&lt;P data-start="754" data-end="810"&gt;Here’s a refined Vega-Lite pattern you can use in Deneb:&lt;/P&gt;
&lt;P data-start="754" data-end="810"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="754" data-end="810"&gt;{&lt;BR /&gt;"$schema": "&lt;A href="https://vega.github.io/schema/vega-lite/v5.json" target="_blank"&gt;https://vega.github.io/schema/vega-lite/v5.json&lt;/A&gt;",&lt;BR /&gt;"data": {"name": "dataset"},&lt;BR /&gt;"width": "container",&lt;BR /&gt;"height": 300,&lt;BR /&gt;"mark": {"type": "bar"},&lt;BR /&gt;"encoding": {&lt;BR /&gt;"x": {&lt;BR /&gt;"field": "Venue",&lt;BR /&gt;"type": "ordinal",&lt;BR /&gt;"axis": {"labelAngle": -40},&lt;BR /&gt;"spacing": 0&lt;BR /&gt;},&lt;BR /&gt;"y": {"field": "Tickets", "type": "quantitative"}&lt;BR /&gt;},&lt;BR /&gt;"config": {&lt;BR /&gt;"bar": {"band": 0.8}, // wider bars (0.7–0.9 works well)&lt;BR /&gt;"scale": {&lt;BR /&gt;"x": {&lt;BR /&gt;"paddingInner": 0.2, // add spacing between bars&lt;BR /&gt;"clamp": true // prevents over-squashing of bands&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"view": {"stroke": "transparent"} // removes default border&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P data-start="754" data-end="810"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="754" data-end="810"&gt;BBF&lt;/P&gt;
&lt;DIV style="font-family: Segoe UI, sans-serif; font-size: 14px; line-height: 1.2;"&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt; &lt;STRONG&gt;Did I answer your question?&lt;/STRONG&gt; Mark my post as a solution! &lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; Kudos are appreciated &lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":fire:"&gt;🔥&lt;/span&gt; Proud to be a Super User!&lt;/STRONG&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Community News image 1920X1080.png" style="width: 150px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1238084iB989B7DAABABDDDF/image-size/large?v=v2&amp;amp;px=999" width="150" role="button" title="Community News image 1920X1080.png" alt="Community News image 1920X1080.png" /&gt;&lt;/span&gt; &lt;/DIV&gt;</description>
      <pubDate>Mon, 20 Oct 2025 07:24:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-How-to-set-a-minimum-width-with-dynamic-step-sizing/m-p/4853789#M12869</guid>
      <dc:creator>BeaBF</dc:creator>
      <dc:date>2025-10-20T07:24:24Z</dc:date>
    </item>
  </channel>
</rss>

