<?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 Deneb: Multi-layer card in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3078328#M6866</link>
    <description>&lt;P&gt;Hi everyone, I am still learning the basics and exploring the world of Deneb vega-lite. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;SPAN&gt;I am currently trying to figure out how to freely position text and DAX measures in a Deneb chart.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Example: I like to position a DAX measure, e.g. Diameter Mean and a text label "Mean".&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Not sure if I approach this correctly, but I have set up a chart with 10 points in position "Y": 10....1 and "X": ...&amp;nbsp; and I like to position and print the Diameter Mean value at position Y: 10, X: 0 and just beneth it I like to add a text block "Diameter Mean" and the hide the axis scale and points.&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="Salle_0-1676318297592.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871068i7D379805F5B7E052/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Salle_0-1676318297592.png" alt="Salle_0-1676318297592.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;{
  "data": {
    "values": [
      {"A": "0", "B": 10},
      {"A": "0", "B": 9},
      {"A": "0", "B": 8},
      {"A": "0", "B": 7},
      {"A": "0", "B": 6},
      {"A": "0", "B": 5},
      {"A": "0", "B": 4},
      {"A": "0", "B": 3},
      {"A": "0", "B": 2},
      {"A": "0", "B": 1}
    ]
  },
  "title": "Information",
  "autosize": "fit",
  "background": "lightblue",
  "width": 150,
  "height": 400,
  "padding": {
    "left": 10,
    "right": 15,
    "top": 10,
    "bottom": "10"
  },
  "encoding": {
    "x": {
      "field": "A",
      "type": "quantitative",
      "scale": {"domain": [0, 1]},
      "axis": true
    },
    "y": {"axis": true}
  },
  "layer": [
    {
      "mark": {"type": "point"},
      "encoding": {
        "y": {
          "field": "B",
          "type": "quantitative"
        }
      }
    },
    {
      "mark": {
        "type": "text",
        "dx": 20,
        "dy": 0,
        "xOffset": 0,
        "yOffset": 0,
        "angle": 0,
        "align": "left",
        "baseline": "bottom",
        "font": "sans-serif",
        "fontSize": 16,
        "fontStyle": "normal",
        "fontWeight": "normal",
        "limit": 0
      },
      "encoding": {
        "x": {
          "field": 0,
          "type": "quantitative"
        },
        "y": {
          "field": 10,
          "type": "quantitative"
        }
        
      }
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips on how I should continue or if you could point me to some similar examples for multi-layer cards would be highly appreciated. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2023 20:02:36 GMT</pubDate>
    <dc:creator>Salle</dc:creator>
    <dc:date>2023-02-13T20:02:36Z</dc:date>
    <item>
      <title>Deneb: Multi-layer card</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3078328#M6866</link>
      <description>&lt;P&gt;Hi everyone, I am still learning the basics and exploring the world of Deneb vega-lite. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;SPAN&gt;I am currently trying to figure out how to freely position text and DAX measures in a Deneb chart.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Example: I like to position a DAX measure, e.g. Diameter Mean and a text label "Mean".&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Not sure if I approach this correctly, but I have set up a chart with 10 points in position "Y": 10....1 and "X": ...&amp;nbsp; and I like to position and print the Diameter Mean value at position Y: 10, X: 0 and just beneth it I like to add a text block "Diameter Mean" and the hide the axis scale and points.&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="Salle_0-1676318297592.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871068i7D379805F5B7E052/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Salle_0-1676318297592.png" alt="Salle_0-1676318297592.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;{
  "data": {
    "values": [
      {"A": "0", "B": 10},
      {"A": "0", "B": 9},
      {"A": "0", "B": 8},
      {"A": "0", "B": 7},
      {"A": "0", "B": 6},
      {"A": "0", "B": 5},
      {"A": "0", "B": 4},
      {"A": "0", "B": 3},
      {"A": "0", "B": 2},
      {"A": "0", "B": 1}
    ]
  },
  "title": "Information",
  "autosize": "fit",
  "background": "lightblue",
  "width": 150,
  "height": 400,
  "padding": {
    "left": 10,
    "right": 15,
    "top": 10,
    "bottom": "10"
  },
  "encoding": {
    "x": {
      "field": "A",
      "type": "quantitative",
      "scale": {"domain": [0, 1]},
      "axis": true
    },
    "y": {"axis": true}
  },
  "layer": [
    {
      "mark": {"type": "point"},
      "encoding": {
        "y": {
          "field": "B",
          "type": "quantitative"
        }
      }
    },
    {
      "mark": {
        "type": "text",
        "dx": 20,
        "dy": 0,
        "xOffset": 0,
        "yOffset": 0,
        "angle": 0,
        "align": "left",
        "baseline": "bottom",
        "font": "sans-serif",
        "fontSize": 16,
        "fontStyle": "normal",
        "fontWeight": "normal",
        "limit": 0
      },
      "encoding": {
        "x": {
          "field": 0,
          "type": "quantitative"
        },
        "y": {
          "field": 10,
          "type": "quantitative"
        }
        
      }
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips on how I should continue or if you could point me to some similar examples for multi-layer cards would be highly appreciated. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 20:02:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3078328#M6866</guid>
      <dc:creator>Salle</dc:creator>
      <dc:date>2023-02-13T20:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Deneb: Multi-layer card</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3078387#M6867</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/511107"&gt;@Salle&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;If you want to explicitly position a mark you need to use the &lt;FONT face="courier new,courier"&gt;&lt;A href="https://vega.github.io/vega-lite/docs/value.html" target="_self"&gt;value&lt;/A&gt;&lt;/FONT&gt; encoding rather than &lt;FONT face="courier new,courier"&gt;&lt;A href="https://vega.github.io/vega-lite/docs/field.html" target="_self"&gt;field&lt;/A&gt;&lt;/FONT&gt;. This will let you specify an x/y position relative to the view (which is the area reserved for your axes rather than the container).&lt;/P&gt;
&lt;P&gt;You could change your text mark's encoding channel as follows:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;      "encoding": {
        "x": {
          "value": 0
        },
        "y": {
          "value": 10
        }
      }&lt;/LI-CODE&gt;
&lt;P&gt;Which would plot your make at 0, 10 (noting that explicit coordinates in SVG/HTML start from the top-left), e.g.:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmp_0-1676320901958.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871075iADCB94744709CC65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dmp_0-1676320901958.png" alt="dmp_0-1676320901958.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The challenge here is that because you are explicitly stating the same coordinates for each occurrence of your data, this will overlay all marks on top of each other (which is why they appear 'thick').&lt;/P&gt;
&lt;P&gt;If you want to plot the position relative to your data (which I assume would be the point mark i nyour other layer, you would probably want to mix the encoding with both value (for explicit x positioning) and field (for y-positioning) - and you could probably share the y-encoding between all layers (at the top-level), e.g.:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "data": {
    "values": [
      {"A": "0", "B": 10},
      {"A": "0", "B": 9},
      {"A": "0", "B": 8},
      {"A": "0", "B": 7},
      {"A": "0", "B": 6},
      {"A": "0", "B": 5},
      {"A": "0", "B": 4},
      {"A": "0", "B": 3},
      {"A": "0", "B": 2},
      {"A": "0", "B": 1}
    ]
  },
  "title": "Information",
  "background": "lightblue",
  "encoding": {
    "x": {
      "field": "A",
      "type": "quantitative",
      "scale": {"domain": [0, 1]}
    },
    "y": {
      "field": "B",
      "type": "quantitative"
    }
  },
  "layer": [
    {
      "mark": {"type": "point"}
    },
    {
      "mark": {
        "text": "my text mark",
        "type": "text",
        "align": "left",
        "font": "sans-serif",
        "fontSize": 16,
        "dx": 10
      },
      "encoding": {
        "x": {"value": 0}
      }
    }
  ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmp_1-1676321654663.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871086i422B3373D61BCDD7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dmp_1-1676321654663.png" alt="dmp_1-1676321654663.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note that I've removed some of the redundant properties from your original spec just to help highlight what is needed, and I've also used a dx property to offset the text mark 10px to the right of the x-encoded value so that it doesn't overlap. If you don't need this, then you could just delete it so it sits right on the x-value.&lt;/P&gt;
&lt;P&gt;I'm still not 100% sure of your final intended result, but here's how I might attempt having multiple 'cards' with two text marks inside them - maybe this will be something you can use to evolve your idea:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
  "data": {
    "values": [
      {"A": "0", "B": 10, "mean": 8},
      {"A": "0", "B": 9, "mean": 8.2},
      {"A": "0", "B": 8, "mean": 8.5},
      {"A": "0", "B": 7, "mean": 9.1},
      {"A": "0", "B": 6, "mean": 9.8},
      {"A": "0", "B": 5, "mean": 3.3},
      {"A": "0", "B": 4, "mean": 7.8},
      {"A": "0", "B": 3, "mean": 8.1},
      {"A": "0", "B": 2, "mean": 4.7},
      {"A": "0", "B": 1, "mean": 6.3}
    ]
  },
  "encoding": {
    "y": {
      "field": "B",
      "type": "nominal",
      "axis": null
    }
  },
  "layer": [
    {
      "description": "Card - using bar that spans width",
      "mark": {
        "type": "bar",
        "fill": "transparent",
        "stroke": "black"
      }
    },
    {
      "description": "Measure label",
      "mark": {
        "type": "text",
        "baseline": "bottom",
        "dy": -2
      },
      "encoding": {
        "text": {"field": "mean"}
      }
    },
    {
      "description": "Static text",
      "mark": {
        "type": "text",
        "baseline": "top",
        "dy": 2,
        "text": "Diameter mean"
      }
    }
  ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmp_2-1676321996899.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871091iB3F79E0201B81FC1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dmp_2-1676321996899.png" alt="dmp_2-1676321996899.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I've added a "mean" field with random values just to show variety in the cards.&lt;/P&gt;
&lt;P&gt;The two text marks are baselined and dy'd so that one sits 'above' the centre and the other sits 'below' the centre. As I said, this may not be exacly what you are after but may give you some additional thoughts on how to approach.&lt;/P&gt;
&lt;P&gt;If you need further assistance, it might be worth posting a mockupu of what you expect a card to =look like and I can see if I can tweak accordingly.&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 21:01:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3078387#M6867</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2023-02-13T21:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Deneb: Multi-layer card</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3079357#M6870</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;for taking the time and provide your input. It never crossed my mind to approach it by the use of bar.&lt;BR /&gt;I will try and use and test your input now and likely will have some follow up questions &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Basically I am trying to replica a multi-card I set up in Power BI.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Salle_0-1676372883794.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871455iCD98D93D86A36B9A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Salle_0-1676372883794.png" alt="Salle_0-1676372883794.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With the following dax measures as inputs.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Salle_1-1676372943813.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871456i828D013EBEE7C506/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Salle_1-1676372943813.png" alt="Salle_1-1676372943813.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Each measure with text label I like to be able to pin to a certain individual position e.g. 0, 10; 0, 9 etc.&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Note; In a later step I will try to replace the DAX measure input by doing the calculation in Deneb instead; but that will be another topic later...&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 11:15:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3079357#M6870</guid>
      <dc:creator>Salle</dc:creator>
      <dc:date>2023-02-14T11:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Deneb: Multi-layer card</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3080284#M6874</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&amp;nbsp;, so I realized from your response I did not really need the A and B field at all to position the text labels.&lt;BR /&gt;But I ran into problems when I trying to position my Measure "Diameter mean",&amp;nbsp;got specification error message:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;"encoding": {
"field": "Diameter Mean",
"x": {"value": 0},
"y": {"value": 10}
}&lt;/LI-CODE&gt;&lt;P&gt;Changing the code a bit I was able to get the measure printed but in wrong position.&lt;/P&gt;&lt;P&gt;I want it to be positioned just above the Mean text label but I guess I am fumbeling with the setup of y-value.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Salle_0-1676407531550.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871782i6D69B47DF0DB605B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Salle_0-1676407531550.png" alt="Salle_0-1676407531550.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "data": {"name": "dataset"},
  "title": "Information",
  "background": "lightblue",
  
  "height": 400,
  "width": 200,
  
  
  "layer":[
  {
      "mark": {
        
        "type": "text",
        "align": "left",
        "baseline": "top",
        "font": "sans-serif",
        "fontSize": 24,
        "dx": 10,
        "dy": 0,
        "xOffset": 0,
        "yOffset": 0
      },
      
      "encoding": {
        "field": "Diameter Mean",
        "x": {"value": 0},
        "y": {"value": 10}
      
      }
      
      
    },
    
    {
      "mark": {
        "text": "Mean",
        "type": "text",
        "align": "left",
        "baseline": "top",
        "font": "sans-serif",
        "fontSize": 16,
        "dx": 10,
        "dy": 0,
        "xOffset": 0,
        "yOffset": 0
      },
      
      "encoding": {
        "x": {"value": 0},
        "y": {"value": 30}
        
      }
      
    },
      
    {
      "mark": {
        "text": "Diameter Median",
        "type": "text",
        "baseline": "top",
        "align": "left",
        "font": "sans-serif",
        "fontSize": 16,
        "dx": 10,
        "dy": 0,
        "xOffset": 0,
        "yOffset": 0
      },
      "encoding": {
        "x": {"value": 0},
        "y": {"value": 80}
        
      }
    },
    
    
    {
      "mark": {
        "text": "Diameter Max",
        "type": "text",
        "baseline": "top",
        "align": "left",
        "font": "sans-serif",
        "fontSize": 16,
        "dx": 10,
        "dy": 0,
        "xOffset": 0,
        "yOffset": 0
      },
      
      "encoding": {
        "x": {"value": 0},
        "y": {"value": 130}
      
      }
    }
    
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;Any help would be appreciated. Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 20:59:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3080284#M6874</guid>
      <dc:creator>Salle</dc:creator>
      <dc:date>2023-02-14T20:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Deneb: Multi-layer card</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3080295#M6875</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/511107"&gt;@Salle&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I assume that you want the text to display the mean value? If so, you need to add a &lt;A href="https://vega.github.io/vega-lite/docs/text.html" target="_self"&gt;&lt;FONT face="courier new,courier"&gt;text&lt;/FONT&gt; encoding channel property&lt;/A&gt; and put the field in there. So, your snippet of JSON that didn't match Vega-Lite's construct for what I think you want to do should look like this:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;"encoding": {
  "text": { "field": "Diameter Mean" },
  "x": {"value": 0},
  "y": {"value": 10}
}&lt;/LI-CODE&gt;
&lt;P&gt;My output now looks as follows:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmp_0-1676408895875.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871789iCF3F53BA2CE61A1D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dmp_0-1676408895875.png" alt="dmp_0-1676408895875.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Revised spec:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
  "data": {"name": "dataset"},
  "title": "Information",
  "background": "lightblue",
  "height": 400,
  "width": 200,
  "layer": [
    {
      "mark": {
        "type": "text",
        "align": "left",
        "baseline": "top",
        "font": "sans-serif",
        "fontSize": 24,
        "dx": 10,
        "dy": 0,
        "xOffset": 0,
        "yOffset": 0
      },
      "encoding": {
        "text": {
          "field": "Diameter Mean"
        },
        "x": {"value": 0},
        "y": {"value": 10}
      }
    },
    {
      "mark": {
        "text": "Mean",
        "type": "text",
        "align": "left",
        "baseline": "top",
        "font": "sans-serif",
        "fontSize": 16,
        "dx": 10,
        "dy": 0,
        "xOffset": 0,
        "yOffset": 0
      },
      "encoding": {
        "x": {"value": 0},
        "y": {"value": 30}
      }
    },
    {
      "mark": {
        "text": "Diameter Median",
        "type": "text",
        "baseline": "top",
        "align": "left",
        "font": "sans-serif",
        "fontSize": 16,
        "dx": 10,
        "dy": 0,
        "xOffset": 0,
        "yOffset": 0
      },
      "encoding": {
        "x": {"value": 0},
        "y": {"value": 80}
      }
    },
    {
      "mark": {
        "text": "Diameter Max",
        "type": "text",
        "baseline": "top",
        "align": "left",
        "font": "sans-serif",
        "fontSize": 16,
        "dx": 10,
        "dy": 0,
        "xOffset": 0,
        "yOffset": 0
      },
      "encoding": {
        "x": {"value": 0},
        "y": {"value": 130}
      }
    }
  ]
}&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 21:10:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3080295#M6875</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2023-02-14T21:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Deneb: Multi-layer card</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3080322#M6876</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/511107"&gt;@Salle&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;This may be jumping ahead of your learning journey, but possibly something for you to think about to avoid too much repetition.&lt;/P&gt;
&lt;P&gt;If you're just adding measures and your dataset is effectively one row, you can use a &lt;A href="https://vega.github.io/vega-lite/docs/fold.html" target="_self"&gt;fold transform&lt;/A&gt; (which is the same as an unpivot in Power Query) and specify your measure names, to get a simpler list of name/value pairs that you can encode just using two marks.&lt;/P&gt;
&lt;P&gt;So, if my dataset looks like this...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmp_1-1676409661257.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871798i3237A9A92E15A4BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="dmp_1-1676409661257.png" alt="dmp_1-1676409661257.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I can add the following transform...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;  "transform": [
    {
      "fold": [
        "Diameter Mean",
        "Diameter Median",
        "Diameter Max"
      ],
      "as": ["measure", "value"]
    }
  ],&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...and the resulting dataset (now named as data_0 by Vega-Lite) will look like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmp_2-1676409784676.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871800i947F85338B31DD8C/image-size/large?v=v2&amp;amp;px=999" role="button" title="dmp_2-1676409784676.png" alt="dmp_2-1676409784676.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You'll notice that this is now 3 rows, with additional&amp;nbsp;&lt;STRONG&gt;measure&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;value&lt;/STRONG&gt; columns. You'll get as many rows as entries you specify in the &lt;FONT face="courier new,courier"&gt;fold&lt;/FONT&gt; operation (as long as they are in your dataset).&lt;/P&gt;
&lt;P&gt;The plan here is that I can encode the &lt;FONT face="courier new,courier"&gt;y&lt;/FONT&gt; channel to &lt;STRONG&gt;measure&lt;/STRONG&gt;, which will position vertically by this field, and then I can add a &lt;FONT face="courier new,courier"&gt;text&lt;/FONT&gt; mark that encodes the &lt;FONT face="courier new,courier"&gt;text&lt;/FONT&gt;&amp;nbsp;channel to the &lt;STRONG&gt;value&lt;/STRONG&gt; column, and another that encodes &lt;FONT face="courier new,courier"&gt;text&lt;/FONT&gt; to the &lt;STRONG&gt;measure&lt;/STRONG&gt; column.&lt;/P&gt;
&lt;P&gt;Here's what this spec might look like as a whole:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
  "data": {"name": "dataset"},
  "title": "Information",
  "background": "lightblue",
  "transform": [
    {
      "fold": [
        "Diameter Mean",
        "Diameter Median",
        "Diameter Max"
      ],
      "as": ["measure", "value"]
    }
  ],
  "encoding": {
    "y": {
      "field": "measure",
      "axis": null
    }
  },
  "layer": [
    {
      "mark": {
        "type": "text",
        "align": "left",
        "baseline": "bottom",
        "fontSize": 24
      },
      "encoding": {
        "text": {"field": "value"}
      }
    },
    {
      "mark": {
        "type": "text",
        "align": "left",
        "baseline": "top",
        "fontSize": 16
      },
      "encoding": {
        "text": {"field": "measure"}
      }
    }
  ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And here's the output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmp_3-1676409922440.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/871803iA684B4F12A4AFD36/image-size/large?v=v2&amp;amp;px=999" role="button" title="dmp_3-1676409922440.png" alt="dmp_3-1676409922440.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hopefully this might help you reduce the amount of maintenance you could potentially have with this one. Good luck!&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt; if you want the y-encoding to sort in the order you type the measures in the fold transform, just add &lt;FONT face="courier new,courier"&gt;"sort": null&lt;/FONT&gt; to enforce this order (&lt;A href="https://vega.github.io/vega-lite/docs/sort.html#:~:text=String%20%7C%20Null-,The%20sort%20order.%20One%20of%20%22ascending%22%20(default)%2C%20%22descending%22%2C%20or%20null%20(no%20not%20sort).,-For%20example%2C%20%22sort" target="_self"&gt;ref&lt;/A&gt;). The y-encoding from above would now look as follows:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;  "encoding": {
    "y": {
      "field": "measure",
      "axis": null,
      "sort": null
    }
  },&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 14 Feb 2023 21:31:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3080322#M6876</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2023-02-14T21:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Deneb: Multi-layer card</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3080349#M6877</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;:&lt;BR /&gt;Daniel, thank you for all the time and effort you put in to guide me through some of the basic elements in Deneb! I really appreciate all the support and tips!&lt;BR /&gt;&lt;BR /&gt;I will certainly look into your suggestion with using fold, I did not know it existed.&lt;BR /&gt;But I am starting to learn that anything is possible with Deneb &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers/Carl&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 21:47:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Deneb-Multi-layer-card/m-p/3080349#M6877</guid>
      <dc:creator>Salle</dc:creator>
      <dc:date>2023-02-14T21:47:18Z</dc:date>
    </item>
  </channel>
</rss>

