<?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: Vega-lite Deneb: How to make labels more readable on bubble chart in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Vega-lite-Deneb-How-to-make-labels-more-readable-on-bubble-chart/m-p/4009905#M10036</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not currently possible in Vega-Lite, but Vega has a &lt;A href="https://vega.github.io/vega/docs/transforms/label/" target="_self"&gt;label transform&lt;/A&gt; that can be used to avoid overlapping text marks. Porting this to Vega-Lite is on the roadmap, but the developers have no ETA at this time. If this is something you need, then you'll need to convert your specification to use Vega rather than Vega-Lite.&lt;/P&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, 25 Jun 2024 22:24:14 GMT</pubDate>
    <dc:creator>dm-p</dc:creator>
    <dc:date>2024-06-25T22:24:14Z</dc:date>
    <item>
      <title>Vega-lite Deneb: How to make labels more readable on bubble chart</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Vega-lite-Deneb-How-to-make-labels-more-readable-on-bubble-chart/m-p/3349358#M10024</link>
      <description>&lt;P&gt;I have a bubble chart on Power BI that I made using the Deneb visual in Vega-lite. I am new to Vega-lite so I'm still learning. I want each bubble to have a label with the title for that row. However, I want to make it so the labels don't overlap if possible. Is there a way to make the labels not overlap? The labels also overlap the legend on the right. I was also thinking about filtering so that only larger bubbles have a label, but I'm not sure how to do that either.&lt;/P&gt;&lt;P&gt;Here is a screenshot showing how the labels overlap each other and the legend.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="asodie_1-1690307675724.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/946600i38B8367A8B297EF5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="asodie_1-1690307675724.png" alt="asodie_1-1690307675724.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my script with some dummy data to show the issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "name": "dataset"
  },
  "width": 950,
  "height": 400,
  
  
  "encoding": {
    "x": {
      "field": "Date",
      "type": "temporal",
      "axis": {"grid": false, "format":"Q%q %Y"}
    },
    "y": {
      "field": "Prob", 
      "type": "quantitative", 
      "axis": {"title": "prob"}
    },
           
    "tooltip" : [
                {"field":"Title", "type": "nominal"},
                {"field":"Group", "type": "nominal"},
                {"field":"Section", "type": "nominal"},
                {"field":"Amount", "type": "nominal"},
                {"field":"ID#", "type":"nominal"},
                {"field":"Description", "type":"nominal"}
                ]
  },
  
  
  "layer":[{
      "mark":{
        "type": "circle",
        "opacity": 0.8,
        "stroke": "black",
        "strokeWidth": 1
      },
      "encoding": {
          "size": {
			          "field": "Amount",
      			    "type": "quantitative",
      			    "title": "",
      			    "legend": "",
      			    "scale": {"rangeMax": 1000}
    			 },
    		  "color": {
      			    "field": "Group", 
      			    "type": "nominal"
           }
           
        }
    },
    {
      "mark":{
        "type": "circle",
        "opacity": 0.8,
        "stroke": "black",
        "strokeWidth": 1
      },
      "encoding": {
          "size": {
			          "field": "Amount",
      			    "type": "quantitative",
      			    "title": "",
      			    "legend": "",
      			    "scale": {"rangeMax": 1000}
    			 },
    		  "color": {
      			    "field": "Group", 
      			    "type": "nominal"
           }
        }
    },
    
    {
      "mark":{
      "type": "text",
      "align": "left",
      "baseline": "top",
      "dx":8,
      "limit":150,
      "angle":-25
    },
      "encoding": {
        "text":{"field":"Title", "type":"nominal"}
      },
      "transform": [
        {
          "type": "label",
          "anchor": ["top", "bottom", "right", "left"],
          "offset": [1],
          "size": {"signal": "[width + 60, height]"}
        }
      ]
    }
  ]
  
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 18:01:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Vega-lite-Deneb-How-to-make-labels-more-readable-on-bubble-chart/m-p/3349358#M10024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-25T18:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Vega-lite Deneb: How to make labels more readable on bubble chart</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Vega-lite-Deneb-How-to-make-labels-more-readable-on-bubble-chart/m-p/4009905#M10036</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not currently possible in Vega-Lite, but Vega has a &lt;A href="https://vega.github.io/vega/docs/transforms/label/" target="_self"&gt;label transform&lt;/A&gt; that can be used to avoid overlapping text marks. Porting this to Vega-Lite is on the roadmap, but the developers have no ETA at this time. If this is something you need, then you'll need to convert your specification to use Vega rather than Vega-Lite.&lt;/P&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, 25 Jun 2024 22:24:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Vega-lite-Deneb-How-to-make-labels-more-readable-on-bubble-chart/m-p/4009905#M10036</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2024-06-25T22:24:14Z</dc:date>
    </item>
  </channel>
</rss>

