ArcView places pies chart legend graphics at the centroid of each polygon, and it does not let you adjust the location of those pie charts. This article discusses a method you can use to adjust that location.
- Add X and Y fields to the polygon attribute table containing the coordinates of the polygon centroid.
ArcView GIS 3.x comes with a sample script that adds X and Y coordinates to the attribute table of the active point or polygon theme. The script adds two new fields named X-coord and Y-coord and populates those fields accordingly. If the active theme is a polygon theme, the X and Y coordinates of the polygon centroid are calculated. The polygon centroid is based on the polygon's center of mass. The centroid coordinate values are in the same units as the theme.
- Open a new view.
- Load the desired theme.
- Open a new script window.
A. Activate the Project window.
B. Click the Scripts icon.
C. Click New.
- Select Load Text File from the Script menu.
- Navigate to the ..\esri\av_gis30\arcview\samples\scripts directory.
- Select the file addxycoo.ave and click OK.
- Attach the script to a button.
A. Compile the script.
B. Switch to the Project window.
C. Select Customize from the Project menu.
D. On the Customize dialog box, click the Type dropdown arrow and click View.
E. Select Buttons under Category.
F. Click the New button.
G. Double-click the Click property in the Customize dialog box.
H. Type the name of the script in the Script Manager and click Select.
I. Close the Customize dialog box.
For more information, see "Customize dialog box" in ArcView Help.
- Switch back to the view and make the target theme active.
- Click the new button to run the script.
- Create an Event Theme based on the X and Y fields of the polygon shapefile attribute table.
A. Open a view.
B. Select Add Event Theme from the View menu.
C. Specify a table, an X field, and a Y field.
D. Click OK.
- Convert the Event Theme to a shapefile.
- Make the new theme active.
- Select Start Editing from the Theme menu.
- Use the pointer tool to move the point to the desired location.
- Stop editing and save edits.
- Use the Legend Editor to make the pie chart labels based upon the point theme.