<?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: Vizlib pie chart - custom colors in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Vizlib-pie-chart-custom-colors/m-p/1599168#M44299</link>
    <description>&lt;P&gt;Hello!&lt;SPAN&gt;&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You may reach us at&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;support@vizlib.com&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or you can open a ticket after you login to our User Portal.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can also evaluate as a free trial, by downloading and installing our Vizlib June 2019 Release.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Vizlib Customer Success Manager&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jul 2019 15:28:37 GMT</pubDate>
    <dc:creator>Giuseppe_VizLib</dc:creator>
    <dc:date>2019-07-04T15:28:37Z</dc:date>
    <item>
      <title>Vizlib pie chart - custom colors</title>
      <link>https://community.qlik.com/t5/App-Development/Vizlib-pie-chart-custom-colors/m-p/112244#M7711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm actually using the Vizlib library, and specially the Pie chart component.&lt;/P&gt;&lt;P&gt;The pie chart provides an option for custom colors. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The official website says :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="text-decoration: underline;"&gt;Use Custom Colors&lt;/SPAN&gt;&lt;BR /&gt;You have got the freedom to choose your own collection of colors. This is particularly useful when you wish to be consistent with your corporate colors e.g.. Just specify a commma separated list of hex-colors (#4477aa,#7db8da,#b6d7ea,...) and Vizlib Pie Chart will loop through it and dynamically assign the colors to the lines.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So ok, I'm using a list of value like : '#ffce44,#f07f3c,#ea5153,#0085b9,#3f5782,#814a84,#dddf4b,#297e4c', for my colors. Each value represents a category. &lt;/P&gt;&lt;P&gt;For example I want to display a list of assets, categorized by asset_type. And I want that a specified asset_type got a specified color.&lt;/P&gt;&lt;P&gt;Everything runs well, when I have at least one asset of each asset_type, but when an asset_type is empty, the pie chart will display the wrong colors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried to use a a variable which contains my list of colors (vColors) and then with some if and the PurgeChar function, I'm able to remove the specified color from the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, I can do something like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Sum({$&amp;lt;[asset_type] = {'1'},[asset_group]&amp;gt;}[asset_value])=0,PurgeChar(vColors,'&lt;SPAN style="font-size: 13.3333px;"&gt;#ffce44,&lt;/SPAN&gt; ',vColors)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I can have a lot of possible combinations, so I'm' looking for a smart way to do that, for example modifying my variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=if(Sum({$&amp;lt;[asset_type] = {'1'},[asset_group]&amp;gt;}[asset_value])=0,vColors = PurgeChar(vColors,'&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;#ffce44,&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; ',vColors)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Modifying my variable and at the end 'returning' this variable but I don't know how to do that with Qlik.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Any idea ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks for your help.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 12:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Vizlib-pie-chart-custom-colors/m-p/112244#M7711</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-17T12:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Vizlib pie chart - custom colors</title>
      <link>https://community.qlik.com/t5/App-Development/Vizlib-pie-chart-custom-colors/m-p/1599168#M44299</link>
      <description>&lt;P&gt;Hello!&lt;SPAN&gt;&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You may reach us at&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;support@vizlib.com&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or you can open a ticket after you login to our User Portal.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can also evaluate as a free trial, by downloading and installing our Vizlib June 2019 Release.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Vizlib Customer Success Manager&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 15:28:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Vizlib-pie-chart-custom-colors/m-p/1599168#M44299</guid>
      <dc:creator>Giuseppe_VizLib</dc:creator>
      <dc:date>2019-07-04T15:28:37Z</dc:date>
    </item>
  </channel>
</rss>

