<?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: Applying colors for Table. Custom Visual in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Applying-colors-for-Table-Custom-Visual/m-p/68474#M2235</link>
    <description>&lt;P&gt;Guys, no help at all?&lt;/P&gt;&lt;P&gt;Nobody stuck yet with Custom Visuals?&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2016 04:54:08 GMT</pubDate>
    <dc:creator>nicksav</dc:creator>
    <dc:date>2016-09-15T04:54:08Z</dc:date>
    <item>
      <title>Applying colors for Table. Custom Visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Applying-colors-for-Table-Custom-Visual/m-p/67836#M2211</link>
      <description>&lt;P&gt;Guys,&amp;nbsp;I am struggaling here to get the colors working and I would like to understand the flow in the code for Sample Bar Chart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, there is a function to show properties on UI, called &lt;STRONG&gt;enumerateObjectInstances&lt;/STRONG&gt;. In the BarChart sample, we are doing this by looping through Categories (Apple, Orange, Plumb) and pushing&amp;nbsp;the (Label - Color picker) pair to the UI. At this point we already have color as part of our Data Point,&amp;nbsp;So, making total sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, to assign a color to data point, we are going to the&amp;nbsp;&lt;STRONG&gt;visualTransform&amp;nbsp;&lt;/STRONG&gt;function. And this is where I get some issues understanding the flow.&lt;/P&gt;&lt;P&gt;1) We get a colorPalette. Just a simple array of all avalable colors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Now depending on count of Values and Categories, we need to get max, we assign a default color to the the Category.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Now before setting value for Data Point, we call function&amp;nbsp;&lt;STRONG&gt;getCategoricalObjectValue.&amp;nbsp;&lt;/STRONG&gt;I understand, that this function goes for Apple and cheking if any colour was already assigned before to Apple, if not set the default from step 2. So, basically, if we run it first time, we dont have any colors assigned, so all categories pick the color from default.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, the interesting thing for me here is that when we have categorical data set, and we run the first time,&amp;nbsp;&lt;STRONG&gt;category.objects&lt;/STRONG&gt; is even dont exsts (in &lt;STRONG&gt;getCategoricalObjectValue &lt;/STRONG&gt;function). However, when I changed the color for one of the Category, the update is trigered and I can see that now each Category will have object assign to it, kind of binding Category to Object Fill. I am missing this link guys. I don't understand at which point that link is happening..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2016 01:18:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Applying-colors-for-Table-Custom-Visual/m-p/67836#M2211</guid>
      <dc:creator>nicksav</dc:creator>
      <dc:date>2016-09-14T01:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Applying colors for Table. Custom Visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Applying-colors-for-Table-Custom-Visual/m-p/67894#M2212</link>
      <description>&lt;P&gt;Ok guys, one more question on top of this:)&lt;/P&gt;&lt;P&gt;I have a table&amp;nbsp;dataViewMappings. I want to do a color picker for distinct values in one of the columns. So, I get this working, I mean it displays the correct result when I open the Visual Settings. However, when I pick color for one of the values, and update function is trigered, I dont get any values in metadata objects. How would you know which color picker was changed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 11:01:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Applying-colors-for-Table-Custom-Visual/m-p/67894#M2212</guid>
      <dc:creator>nicksav</dc:creator>
      <dc:date>2016-09-13T11:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Applying colors for Table. Custom Visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Applying-colors-for-Table-Custom-Visual/m-p/68474#M2235</link>
      <description>&lt;P&gt;Guys, no help at all?&lt;/P&gt;&lt;P&gt;Nobody stuck yet with Custom Visuals?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 04:54:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Applying-colors-for-Table-Custom-Visual/m-p/68474#M2235</guid>
      <dc:creator>nicksav</dc:creator>
      <dc:date>2016-09-15T04:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Applying colors for Table. Custom Visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Applying-colors-for-Table-Custom-Visual/m-p/69468#M2274</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/13698"&gt;@nicksav﻿&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get a better understanding of its workflow, you could add console.log() in .ts files to output a message to the Web Console.&lt;/P&gt;&lt;PRE&gt;        constructor(options: VisualConstructorOptions) {
			console.log("options:", options);&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Sep 2016 08:46:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Applying-colors-for-Table-Custom-Visual/m-p/69468#M2274</guid>
      <dc:creator>v-chuncz-msft</dc:creator>
      <dc:date>2016-09-19T08:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Applying colors for Table. Custom Visual</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Applying-colors-for-Table-Custom-Visual/m-p/256066#M7900</link>
      <description>&lt;P&gt;The way&amp;nbsp;"the link" between objects and categories happen is when you enumerate the objects in enumerateObjectInstance, by &lt;STRONG&gt;using the selector.&amp;nbsp;&lt;/STRONG&gt;The list of all objects wont be in metadata but in the category object within categories.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This&amp;nbsp;helped &lt;A href="https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/DataBoundObjects.md" target="_blank"&gt;https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/DataBoundObjects.md&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2017 23:16:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Applying-colors-for-Table-Custom-Visual/m-p/256066#M7900</guid>
      <dc:creator>Ernesto</dc:creator>
      <dc:date>2017-09-20T23:16:52Z</dc:date>
    </item>
  </channel>
</rss>

