<?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 Custom Visuals- How to move text when resizing chart in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-How-to-move-text-when-resizing-chart/m-p/118879#M4091</link>
    <description>&lt;P&gt;I tried adding text to the Sample Bar Chart code&lt;/P&gt;&lt;PRE&gt;         bars.enter()
                .append("text")
                .classed("label",true) //or "label"
                .attr ("y",d =&amp;gt; yScale(&amp;lt;number&amp;gt;d.value)+1)
                .attr ("x",d =&amp;gt; xScale(d.category)+xScale.rangeBand()/2)
                .attr("text-anchor", "middle")
             // .attr("font-size", "10000000.5em")
                .attr("fill", "red")
                .text(d =&amp;gt; &amp;lt;string&amp;gt;d.value)
                ;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is this text&amp;nbsp;do not move&amp;nbsp;when&amp;nbsp;I resize the chart&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2017 21:23:45 GMT</pubDate>
    <dc:creator>AmiraB</dc:creator>
    <dc:date>2017-01-25T21:23:45Z</dc:date>
    <item>
      <title>Custom Visuals- How to move text when resizing chart</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-How-to-move-text-when-resizing-chart/m-p/118879#M4091</link>
      <description>&lt;P&gt;I tried adding text to the Sample Bar Chart code&lt;/P&gt;&lt;PRE&gt;         bars.enter()
                .append("text")
                .classed("label",true) //or "label"
                .attr ("y",d =&amp;gt; yScale(&amp;lt;number&amp;gt;d.value)+1)
                .attr ("x",d =&amp;gt; xScale(d.category)+xScale.rangeBand()/2)
                .attr("text-anchor", "middle")
             // .attr("font-size", "10000000.5em")
                .attr("fill", "red")
                .text(d =&amp;gt; &amp;lt;string&amp;gt;d.value)
                ;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is this text&amp;nbsp;do not move&amp;nbsp;when&amp;nbsp;I resize the chart&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 21:23:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-How-to-move-text-when-resizing-chart/m-p/118879#M4091</guid>
      <dc:creator>AmiraB</dc:creator>
      <dc:date>2017-01-25T21:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visuals- How to move text when resizing chart</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-How-to-move-text-when-resizing-chart/m-p/119315#M4104</link>
      <description>&lt;P&gt;This solved the issue .&lt;/P&gt;&lt;PRE&gt;            let text = this.barContainer.selectAll('.bar').data(viewModel.dataPoints);

            text.enter()
                .append('text')
                .classed('bartext', true)
                .text(d =&amp;gt; &amp;lt;string&amp;gt;d.value2);
            text.attr({
                y: d =&amp;gt; height - 15,
                x: d =&amp;gt; xScale(d.category) + xScale.rangeBand() / 2,
                'text-anchor': "middle",
                fill: "red"
            });&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Jan 2017 18:08:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-How-to-move-text-when-resizing-chart/m-p/119315#M4104</guid>
      <dc:creator>AmiraB</dc:creator>
      <dc:date>2017-01-26T18:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Visuals- How to move text when resizing chart</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-How-to-move-text-when-resizing-chart/m-p/119578#M4114</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/20522"&gt;@AmiraB&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Glad to hear that you've solved this problem and thank you for sharing the solution. This might be beneficial to other community members, you could help mark it as answer.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 09:46:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-Visuals-How-to-move-text-when-resizing-chart/m-p/119578#M4114</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2017-01-27T09:46:44Z</dc:date>
    </item>
  </channel>
</rss>

