<?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 How to do conditional color for pie-chart in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-do-conditional-color-for-pie-chart/m-p/1248475#M79914</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a pie chart map, where I define 4 different attributes.&lt;/P&gt;&lt;P&gt;Is it possible to define a conditional color code based on yet another field instead of defining them for each field in the attributes?&lt;/P&gt;&lt;P&gt;Ex.: If Field5 less1 then color should be gray&lt;/P&gt;&lt;P&gt;if Field5 more or equal than 1 and Field4 less and equal than 3 then color should be green&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;I tried defining visualVariables type color and the stops for each different value, but it does not seem to work.&lt;/P&gt;&lt;P&gt;The renderer is defined as following:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;const renderer_pie = {
            type: "pie-chart",
            attributes: [
            {
              field: "Field1",
              label: 'label1',
              color: 'blue'
            },
          {
              field: "Field2",
              label: 'label2',
              color: '#green'
            },
          {
              field: "Field3",
              label: 'label3',
              color: 'orange'
            },
          {
              field: "Field4",
              label: 'label4',
              color: 'gray'
            },
      ] 
 };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jan 2023 15:30:05 GMT</pubDate>
    <dc:creator>laioz</dc:creator>
    <dc:date>2023-01-16T15:30:05Z</dc:date>
    <item>
      <title>How to do conditional color for pie-chart</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-do-conditional-color-for-pie-chart/m-p/1248475#M79914</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a pie chart map, where I define 4 different attributes.&lt;/P&gt;&lt;P&gt;Is it possible to define a conditional color code based on yet another field instead of defining them for each field in the attributes?&lt;/P&gt;&lt;P&gt;Ex.: If Field5 less1 then color should be gray&lt;/P&gt;&lt;P&gt;if Field5 more or equal than 1 and Field4 less and equal than 3 then color should be green&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;I tried defining visualVariables type color and the stops for each different value, but it does not seem to work.&lt;/P&gt;&lt;P&gt;The renderer is defined as following:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;const renderer_pie = {
            type: "pie-chart",
            attributes: [
            {
              field: "Field1",
              label: 'label1',
              color: 'blue'
            },
          {
              field: "Field2",
              label: 'label2',
              color: '#green'
            },
          {
              field: "Field3",
              label: 'label3',
              color: 'orange'
            },
          {
              field: "Field4",
              label: 'label4',
              color: 'gray'
            },
      ] 
 };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jan 2023 15:30:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-do-conditional-color-for-pie-chart/m-p/1248475#M79914</guid>
      <dc:creator>laioz</dc:creator>
      <dc:date>2023-01-16T15:30:05Z</dc:date>
    </item>
  </channel>
</rss>

