Geographic Information Systems Asked by SlyWhiteSheep on December 29, 2020
I’m building a static map, and want to center text in a table I’ve added to the layout. How can this be accomplished in ArcGIS Desktop?
I had the same issue and just put spaces in front of the text in the Attribute Table to approximate centering.
Answered by Robert Sliwinski on December 29, 2020
Possible workaround is using 2nd dataframe as ‘table’.
It’s enough to create vertical string of points from any table (doesn’t matter if it is actual geography or not) using approach I described here and "display" it in dataframe, e.g. 0 size point, white color
Next step – calculate field, e.g. Label using something like:
'|{:^15}|{:^15.3f}|{:^15.3f}| '.format( !COMPKEY! , !Invert!, !LID! )
And label vertical points, using this field and non true type font, e.g Lucinda Console:
Adding field headers is not a big deal. Simple text labels will do..
Because 2nd data frame supports DDP definition query it opens floodgate of opportunities in automation, with table displayed next to map.
Answered by FelixIP on December 29, 2020
For maximum flexibility when adding tables to layouts, I think you will need to look at Adding Table to Layout View using ArcPy? There you would be able to center justify your text elements.
Otherwise, if you if you are restricting yourself to the method described on the Adding a table to a layout page of the Help, you will be restricted to its Appearance options which do not include Center Justification for fields.
Since answering this question in 2016, an eLearning course named Challenging times with Python and ArcPy for ArcGIS Pro has been released and that takes students through the code needed to implement a technique for using point and polygon feature classes in a separate map and map frame to outline and label a table-like feature class using ArcGIS Pro. Since the text in the table cells is actually labelling of point features the use of a center-center anchor point will achieve the center justification (both horizontal and vertical) that you are after.
Disclaimer: I am the developer and presenter of the course mentioned above.
Answered by PolyGeo on December 29, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP