1

In ArcMap you could assign values to each break within a layer's graduated color symbology using classBreakValues and classBreakLabels (A code sample of this can be seen on this page http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/graduatedcolorssymbology-class.htm)

However, I have now transitioned over to ArcGIS Pro and since the ArcPy between Map and Pro are different I can't figure out how to assign values to each break within a layer's graduated color symbology.

Is it possible to assign values to each break within a layer's graduated color symbology in ArcGIS Pro?

Update to Question:

I now have a piece of code that will assign a value of 2 to the first break within a layer's graduated color symbology and then tell the following breaks to increase by 10. However, I still can't figure out how to personally assign a random value to each break.

Here is my code:

import arcpy, os, sys, locale
p = arcpy.mp.ArcGISProject("Current")
m = p.listMaps("Map")[0]
l = m.listLayers("ProvEPOSigNet_ZIPs")[0]
sym = l.symbology
sym.renderer.classificationField = "SUM_USER_Patient_Count"
sym.renderer.breakCount = 3

breakVal = 2

for brk in sym.renderer.classBreaks:
  brk.upperBound = breakVal
  brk.label = "\u2264" + str(locale.format("%d", breakVal, grouping=True))

  breakVal +=10

l.symbology = sym

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.