<?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 Add animation to sparkline by DAX in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Add-animation-to-sparkline-by-DAX/m-p/2271786#M4194</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="动画迷你图.gif" style="width: 633px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/652564i34C0702D137CC672/image-size/large?v=v2&amp;amp;px=999" role="button" title="动画迷你图.gif" alt="动画迷你图.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Measure( mark it as image URL) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sparkline = 
VAR MaxValue =
    MAXX ( VALUES ( 'table'[month]), [Value])
VAR BarTable=
    ADDCOLUMNS(
        SUMMARIZE('table','table'[year],'table'[month],
            "Color","DarkCyan"),// Conditional format 
        "Rect", "&amp;lt;rect x='"&amp;amp; ([month] - 1 ) * 10 &amp;amp;"' y='0' height='" &amp;amp; 120*[Value] / MaxValue &amp;amp; "' width='10' fill='" &amp;amp; [Color] &amp;amp; "'&amp;gt; 
&amp;lt;animate attributeName='y' from='"&amp;amp;-120*[Value] / MaxValue&amp;amp;"' to='0' begin='0s' dur='3s' repeatCount='indefinite'/&amp;gt; 
&amp;lt;/rect&amp;gt;")
Return
    "data&amp;amp;colon;image/svg+xml;utf8,"&amp;amp;"
    &amp;lt;svg xmlns='http://www.w3.org/2000/svg' viewbox='0 0 120 120'&amp;gt; "&amp;amp;
        CONCATENATEX(BarTable,[Rect])&amp;amp;"
        &amp;lt;text x='60' y='30' font-size='20' text-anchor='middle' dominant-baseline='middle' fill='#F4F5F9'&amp;gt;"&amp;amp;FORMAT([Value],"0,000")&amp;amp;"&amp;lt;/text&amp;gt;
    &amp;lt;/svg&amp;gt; " &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jan 2022 14:17:04 GMT</pubDate>
    <dc:creator>wujunmin</dc:creator>
    <dc:date>2022-01-07T14:17:04Z</dc:date>
    <item>
      <title>Add animation to sparkline by DAX</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Add-animation-to-sparkline-by-DAX/m-p/2271786#M4194</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="动画迷你图.gif" style="width: 633px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/652564i34C0702D137CC672/image-size/large?v=v2&amp;amp;px=999" role="button" title="动画迷你图.gif" alt="动画迷你图.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Measure( mark it as image URL) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sparkline = 
VAR MaxValue =
    MAXX ( VALUES ( 'table'[month]), [Value])
VAR BarTable=
    ADDCOLUMNS(
        SUMMARIZE('table','table'[year],'table'[month],
            "Color","DarkCyan"),// Conditional format 
        "Rect", "&amp;lt;rect x='"&amp;amp; ([month] - 1 ) * 10 &amp;amp;"' y='0' height='" &amp;amp; 120*[Value] / MaxValue &amp;amp; "' width='10' fill='" &amp;amp; [Color] &amp;amp; "'&amp;gt; 
&amp;lt;animate attributeName='y' from='"&amp;amp;-120*[Value] / MaxValue&amp;amp;"' to='0' begin='0s' dur='3s' repeatCount='indefinite'/&amp;gt; 
&amp;lt;/rect&amp;gt;")
Return
    "data&amp;amp;colon;image/svg+xml;utf8,"&amp;amp;"
    &amp;lt;svg xmlns='http://www.w3.org/2000/svg' viewbox='0 0 120 120'&amp;gt; "&amp;amp;
        CONCATENATEX(BarTable,[Rect])&amp;amp;"
        &amp;lt;text x='60' y='30' font-size='20' text-anchor='middle' dominant-baseline='middle' fill='#F4F5F9'&amp;gt;"&amp;amp;FORMAT([Value],"0,000")&amp;amp;"&amp;lt;/text&amp;gt;
    &amp;lt;/svg&amp;gt; " &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 14:17:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Add-animation-to-sparkline-by-DAX/m-p/2271786#M4194</guid>
      <dc:creator>wujunmin</dc:creator>
      <dc:date>2022-01-07T14:17:04Z</dc:date>
    </item>
  </channel>
</rss>

