English

How To: Move pie chart legend symbols of a polygon theme

Summary

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.

Procedure

  1. Add X and Y fields to the polygon attribute table containing the coordinates of the polygon centroid.

    Summary:
    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.

    Procedure:


    1. Open a new view.
    2. Load the desired theme.
    3. Open a new script window.

      A. Activate the Project window.
      B. Click the Scripts icon.
      C. Click New.

    4. Select Load Text File from the Script menu.
    5. Navigate to the ..\esri\av_gis30\arcview\samples\scripts directory.
    6. Select the file addxycoo.ave and click OK.
    7. 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.

    8. Switch back to the view and make the target theme active.
    9. Click the new button to run the script.


  2. 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.

  3. Convert the Event Theme to a shapefile.
  4. Make the new theme active.
  5. Select Start Editing from the Theme menu.
  6. Use the pointer tool to move the point to the desired location.
  7. Stop editing and save edits.
  8. Use the Legend Editor to make the pie chart labels based upon the point theme.