<?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: Custom visual  - Grouped bar chart not working in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-Grouped-bar-chart-not-working/m-p/360360#M10730</link>
    <description>&lt;P&gt;Looks like this issue is related to TypeScript types.&lt;/P&gt;
&lt;P&gt;Can you share all of files that are in the your custom visual (pbiviz.json, /src, tsconfig.json, etc.)?&lt;/P&gt;
&lt;P&gt;What version of pbiviz tools do you use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;&lt;SPAN&gt;pbicvsupport@microsoft.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Feb 2018 07:37:52 GMT</pubDate>
    <dc:creator>v-viig</dc:creator>
    <dc:date>2018-02-19T07:37:52Z</dc:date>
    <item>
      <title>Custom visual  - Grouped bar chart not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-Grouped-bar-chart-not-working/m-p/359968#M10716</link>
      <description>&lt;P&gt;I'm trying to replicate a grouped bar chart from the below link but getting errors. I resolved few type errors but cannot resolve&amp;nbsp;a data related error.&lt;/P&gt;&lt;P&gt;&lt;A href="https://bl.ocks.org/bricedev/0d95074b6d83a77dc3ad" target="_blank"&gt;https://bl.ocks.org/bricedev/0d95074b6d83a77dc3ad&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The example uses a JSON file. I have removed that part and stored the JSON data in a variable. My code works fine in an HTML file but gives an error in Visual.ts file. The error is in the line&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="javascript"&gt;.attr(&lt;SPAN class="string"&gt;"x"&lt;/SPAN&gt;, &lt;SPAN class="function"&gt;&lt;SPAN class="keyword"&gt;function&lt;/SPAN&gt;(&lt;SPAN class="params"&gt;d&lt;/SPAN&gt;) &lt;/SPAN&gt;{ &lt;SPAN class="keyword"&gt;return&lt;/SPAN&gt; x1(d.rate); })&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;The error is&amp;nbsp;[ts] Property 'rate' does not exist on type '{}'. Looks like the below line is not detecting any data.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="javascript"&gt;.data(&lt;SPAN class="function"&gt;&lt;SPAN class="keyword"&gt;function&lt;/SPAN&gt;(&lt;SPAN class="params"&gt;d&lt;/SPAN&gt;) &lt;/SPAN&gt;{ &lt;SPAN class="keyword"&gt;return&lt;/SPAN&gt; d.values; })&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2018 18:15:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-Grouped-bar-chart-not-working/m-p/359968#M10716</guid>
      <dc:creator>satishr</dc:creator>
      <dc:date>2018-02-17T18:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual  - Grouped bar chart not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-Grouped-bar-chart-not-working/m-p/360360#M10730</link>
      <description>&lt;P&gt;Looks like this issue is related to TypeScript types.&lt;/P&gt;
&lt;P&gt;Can you share all of files that are in the your custom visual (pbiviz.json, /src, tsconfig.json, etc.)?&lt;/P&gt;
&lt;P&gt;What version of pbiviz tools do you use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;&lt;SPAN&gt;pbicvsupport@microsoft.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Feb 2018 07:37:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-Grouped-bar-chart-not-working/m-p/360360#M10730</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-02-19T07:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual  - Grouped bar chart not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-Grouped-bar-chart-not-working/m-p/362264#M10806</link>
      <description>&lt;P&gt;Thanks for the solution&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/17823"&gt;@v-viig&lt;/a&gt;. The solution was&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. To create an interface like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;export interface DataValue {&lt;BR /&gt;value: number;&lt;BR /&gt;rate: string;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Then edit the bar chart code to this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const slice: d3.Selection&amp;lt;Data&amp;gt; = svg.selectAll(".slice")&lt;BR /&gt;.data(data)&lt;BR /&gt;.enter().append("g")&lt;BR /&gt;.attr("class", "g")&lt;BR /&gt;.attr("transform", function (d) { return "translate(" + x0(d.categorie) + ",0)"; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;slice.selectAll("rect")&lt;BR /&gt;.data&amp;lt;DataValue&amp;gt;((d) =&amp;gt; { return d.values; })&lt;BR /&gt;.enter().append("rect")&lt;BR /&gt;.attr("width", x1.rangeBand())&lt;BR /&gt;.attr("x", function (d) { return x1(d.rate).toString(); })&lt;BR /&gt;.style("fill", function (d) { return color(d.rate).toString() })&lt;BR /&gt;.attr("y", function (d) { return +y(d.value); })&lt;BR /&gt;.attr("height", function (d) { return height - (+y(d.value)); });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure why simple D3 code cannot work here. why it has to be so hard?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 12:41:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-Grouped-bar-chart-not-working/m-p/362264#M10806</guid>
      <dc:creator>satishr</dc:creator>
      <dc:date>2018-02-21T12:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual  - Grouped bar chart not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-Grouped-bar-chart-not-working/m-p/362966#M10828</link>
      <description>&lt;P&gt;The issue actually was related to TypeScript types that must be specified.&lt;/P&gt;
&lt;P&gt;We'd recommend you to take a look at &lt;A href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank"&gt;TypeScript Handbook&lt;/A&gt; to find out more about type system.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;&lt;SPAN&gt;pbicvsupport@microsoft.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 08:02:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Custom-visual-Grouped-bar-chart-not-working/m-p/362966#M10828</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2018-02-22T08:02:22Z</dc:date>
    </item>
  </channel>
</rss>

