<?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: Set number of decimals in toc when using class breaks renderer in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/set-number-of-decimals-in-toc-when-using-class/m-p/1488350#M11637</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/791324"&gt;@MariusN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the&amp;nbsp;CIMNumericFormat to format the labels on the renderer. Once your modify the renderer with this format, call the&amp;nbsp;RecalculateRenderer method to update the renderer with your format. Pass in "false" to this method so that it does not regenerate the values for the class breaks. Here is a code snippet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;GraduatedColorsRendererDefinition gcDef = new GraduatedColorsRendererDefinition()
{
  ClassificationField = "POP2000",
  ClassificationMethod = ClassificationMethod.NaturalBreaks,
  BreakCount = 5,
  ColorRamp = GetColorRamp()
  
};
CIMClassBreaksRenderer renderer = (CIMClassBreaksRenderer)featureLayer.CreateRenderer(gcDef);

var numberFormat = new CIMNumericFormat
{
  RoundingValue = 4,
  RoundingOption = esriRoundingOptionEnum.esriRoundNumberOfDecimals,
  ZeroPad = false
};
renderer.NumberFormat = numberFormat;
featureLayer?.SetRenderer(renderer);
featureLayer?.RecalculateRenderer(false);&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 10 Jun 2024 17:12:53 GMT</pubDate>
    <dc:creator>UmaHarano</dc:creator>
    <dc:date>2024-06-10T17:12:53Z</dc:date>
    <item>
      <title>Set number of decimals in toc when using class breaks renderer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/set-number-of-decimals-in-toc-when-using-class/m-p/1486999#M11624</link>
      <description>&lt;P&gt;Is there a way to define the number of decimals/format of the labels in the toc when using the&amp;nbsp;class breaks renderer (GraduatedColorsRendererDefinition).&amp;nbsp;&lt;/P&gt;&lt;P&gt;And,, if the field used for the renderer is empty. show a diferent output in the toc.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;           GraduatedColorsRendererDefinition gcDef = new GraduatedColorsRendererDefinition()
           {
               ClassificationField = "xxx",
               ClassificationMethod = ClassificationMethod.NaturalBreaks,
               BreakCount = 5,
               ColorRamp = colorRamp,

               ExclusionClause = $"{xxx} IS Null Or {xxx} = 0",
               ExclusionSymbol = emptySymbol,
               ExclusionLabel = "No value",
           };&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;No values shows :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MariusN_0-1717759413522.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106449iA0797720AA1A84A1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MariusN_0-1717759413522.png" alt="MariusN_0-1717759413522.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 11:23:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/set-number-of-decimals-in-toc-when-using-class/m-p/1486999#M11624</guid>
      <dc:creator>MariusN</dc:creator>
      <dc:date>2024-06-07T11:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set number of decimals in toc when using class breaks renderer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/set-number-of-decimals-in-toc-when-using-class/m-p/1488042#M11632</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The best way to solve questions like yours is to use &lt;A href="https://github.com/Esri/arcgis-pro-sdk-cim-viewer" target="_self"&gt;CIMViewer&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Compile code, run ArcGIS Pro. Open CIMVIewr and select your layer. All settings you will find in CIMViewer. XML tags are same as objects and properties names.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GKmieliauskas_0-1718004572859.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106582i709E4804BC9D8811/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GKmieliauskas_0-1718004572859.png" alt="GKmieliauskas_0-1718004572859.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In your case you need to set up&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic727.html" target="_self"&gt;Label Property of CIMClassBreak&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;How to work with CIMClassRenderer you can find in ArcGIS Pro community sample&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Authoring/GetSymbolSwatch" target="_self"&gt;GetSymbolSwatch sample&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 07:36:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/set-number-of-decimals-in-toc-when-using-class/m-p/1488042#M11632</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2024-06-10T07:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set number of decimals in toc when using class breaks renderer</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/set-number-of-decimals-in-toc-when-using-class/m-p/1488350#M11637</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/791324"&gt;@MariusN&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the&amp;nbsp;CIMNumericFormat to format the labels on the renderer. Once your modify the renderer with this format, call the&amp;nbsp;RecalculateRenderer method to update the renderer with your format. Pass in "false" to this method so that it does not regenerate the values for the class breaks. Here is a code snippet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;GraduatedColorsRendererDefinition gcDef = new GraduatedColorsRendererDefinition()
{
  ClassificationField = "POP2000",
  ClassificationMethod = ClassificationMethod.NaturalBreaks,
  BreakCount = 5,
  ColorRamp = GetColorRamp()
  
};
CIMClassBreaksRenderer renderer = (CIMClassBreaksRenderer)featureLayer.CreateRenderer(gcDef);

var numberFormat = new CIMNumericFormat
{
  RoundingValue = 4,
  RoundingOption = esriRoundingOptionEnum.esriRoundNumberOfDecimals,
  ZeroPad = false
};
renderer.NumberFormat = numberFormat;
featureLayer?.SetRenderer(renderer);
featureLayer?.RecalculateRenderer(false);&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 10 Jun 2024 17:12:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/set-number-of-decimals-in-toc-when-using-class/m-p/1488350#M11637</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2024-06-10T17:12:53Z</dc:date>
    </item>
  </channel>
</rss>

