<?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 Python code to update Chart fonts and text in ArcGIS Pro in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/python-code-to-update-chart-fonts-and-text-in/m-p/557164#M24408</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking for some python code to update the text and fonts for about 28 bar charts.&amp;nbsp; I have the code to autogenerate the bar charts in python but did not see any reference to updating text in the ArcGIS Pro Chart Arcpy reference guide or code snippets. Here is what I have to generate the charts.&amp;nbsp; I tried to add tags inside the field definitions but that did not work.&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;aprx = arcpy.mp.ArcGISProject("current")&lt;BR /&gt;map = aprx.listMaps()[0]&lt;BR /&gt;indicatorLayer1 = map.listLayers()[0]&lt;BR /&gt;indicatorLayer2 = map.listLayers()[1]&lt;BR /&gt;print (indicatorLayer1, indicatorLayer2)&lt;BR /&gt;for x in range (1, 7):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c = arcpy.Chart('MyChart'+ str(x))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.type = 'bar'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.legend.visible = "True"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.title = "Zone" + str(x) + " - Rivers, Streams, and Canals (2015 to 2017)"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.description = "CHL=Chlorophyll a, DO = Dissolved Oxygen, FC=Fecal Coliform, pH=hydrogen ion concentration, TN=Total Nitrogen, TP=Total Phosphorus, UIA=Un-ionized Ammonia"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.xAxis.field = 'Indicator'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.xAxis.sort = 'ASC'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.xAxis.title = 'Indicator'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.yAxis.field = 'Zone' + x&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.yAxis.title = 'Percent Meeting Threshold'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.addToLayer(indicatorLayer1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ##additional chart mods&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ##updates to the chart&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.bar.splitCategory = 'ResourceFullName'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.bar.aggregation = 'SUM'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.updateChart()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp;I am using the Chart tab format ribbon to update the styles and fonts manually but thought there must be some Python code exposed to change this in a script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jun 2018 19:40:36 GMT</pubDate>
    <dc:creator>NathanWoeber1</dc:creator>
    <dc:date>2018-06-12T19:40:36Z</dc:date>
    <item>
      <title>Python code to update Chart fonts and text in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-code-to-update-chart-fonts-and-text-in/m-p/557164#M24408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking for some python code to update the text and fonts for about 28 bar charts.&amp;nbsp; I have the code to autogenerate the bar charts in python but did not see any reference to updating text in the ArcGIS Pro Chart Arcpy reference guide or code snippets. Here is what I have to generate the charts.&amp;nbsp; I tried to add tags inside the field definitions but that did not work.&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;aprx = arcpy.mp.ArcGISProject("current")&lt;BR /&gt;map = aprx.listMaps()[0]&lt;BR /&gt;indicatorLayer1 = map.listLayers()[0]&lt;BR /&gt;indicatorLayer2 = map.listLayers()[1]&lt;BR /&gt;print (indicatorLayer1, indicatorLayer2)&lt;BR /&gt;for x in range (1, 7):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c = arcpy.Chart('MyChart'+ str(x))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.type = 'bar'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.legend.visible = "True"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.title = "Zone" + str(x) + " - Rivers, Streams, and Canals (2015 to 2017)"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.description = "CHL=Chlorophyll a, DO = Dissolved Oxygen, FC=Fecal Coliform, pH=hydrogen ion concentration, TN=Total Nitrogen, TP=Total Phosphorus, UIA=Un-ionized Ammonia"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.xAxis.field = 'Indicator'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.xAxis.sort = 'ASC'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.xAxis.title = 'Indicator'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.yAxis.field = 'Zone' + x&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.yAxis.title = 'Percent Meeting Threshold'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.addToLayer(indicatorLayer1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ##additional chart mods&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ##updates to the chart&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.bar.splitCategory = 'ResourceFullName'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.bar.aggregation = 'SUM'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.updateChart()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp;I am using the Chart tab format ribbon to update the styles and fonts manually but thought there must be some Python code exposed to change this in a script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 19:40:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-code-to-update-chart-fonts-and-text-in/m-p/557164#M24408</guid>
      <dc:creator>NathanWoeber1</dc:creator>
      <dc:date>2018-06-12T19:40:36Z</dc:date>
    </item>
  </channel>
</rss>

