ArcIMS 统计图

    ArcIMS提供的ArcXML中就自带了生成统计图的标签: CHARTSYMBOL.不过它只提供了两种统计图类型.
        1.pie(饼状图);
        2.bar(柱状图);
    具体实现起来也非常容易.只需要在我们生成的Axl文件或程序运行时提交的AXL字符串中增加一段标签CHARTSYMBOL即可.具体包含参数及使用方法如下:(来源ArcXML Programmer's Reference Guide for ArcIMS 9.2)
    另外,我们可以扩展一下,比如在生成AXL字符串时动态生成SIMPLELABELRENDERER 中的一些参数.例如Field字段内容.又或者尝试增加查询标签,例如:空间查询标签.这样是否可以只对符合查询条件的实体对象显示统计图呢?

Used in

CONFIG   REQUEST   RESPONSE  

Servers

Image  Feature  

Parent elements

EXACT  OTHER  RANGE  SIMPLELABELRENDERER 

Syntax

<CHARTSYMBOL Attribute Description Table
     antialiasing="true | false" [false]
     maxsize="1 - NNN"
     maxvalue="1 - NNN"
     minsize="1 - NNN"
     minvalue="1 - NNN"
     mode="pie | bar" [pie]
     outline="0,0,0 - 255,255,255" [none]
     shadow="0,0,0 - 255,255,255"
     size="1 - NNN"
     sizefield="string"
     transparency="0.0 - 1.0" [1.0]
     width="number"
>

     (r)(m)<CHARTVALUE... />

</CHARTSYMBOL >
(r): Attribute or child element is required.
(m):  Child element can be used multiple times.

Description

Symbolizes features with bar or pie diagrams.

Although chart symbols draw on the map, no information about the chart symbols is displayed in the legend. ArcIMS 9 does not support displaying chart values in the legend.

Restrictions

  • The size of a chart can be determined in one of three ways:
    1. Using the size attribute.
    2. Using the sizefield attribute. This method works only with Image Services. It does not work with Feature Services.
    3. Using the minsize, maxsize, minvalue, and maxvalue attributes.

    One of the three options must be used or no charts are drawn. Size ranks first in priority, and it takes precedence over the other attributes even if they are included. Sizefield is second in priority, and it takes precedence over the other attributes if size is not present. Minsize, maxsize, minvalue, and maxvalue rank third in priority and are acknowledged only when size and sizefield are not present.
  • The attribute sizefield is valid only with Image Services.
  • Not valid with ArcMap Server.

Notes

  • A field listed in CHARTSYMBOL sizefield must also be listed in SIMPLELABELRENDERER field or VALUEMAPLABELRENDERER labelfield.
  • The attributes minsize and maxsize determine the minimum and maximum size of a chart, respectively. For each feature, the size of the chart is relative to other features based on the minimum and maximum values. These values are set using minvalue and maxvalue.

    If a feature has a value less than or equal to minvalue, then the chart is drawn at minsize. If a feature has a value greater than or equal to maxvalue, then the chart is drawn at maxsize. In the following example, the values are based on population. If a feature has a population less than or equal to 10,000, then the size of the chart is 10 pixels. If the feature has a population greater than or equal to 200,000, then the size of the chart is 50 pixels.

    <CHARTSYMBOL minsize="10" minvalue="10000" maxsize="50" maxvalue="200000" >

    All other features are assigned a chart size between 10 and 50 pixels based on population. A feature with a population of 100,000 will have a chart approximately 30 pixels in size. A feature with a population of 1,000,000 is assigned a chart size of 50 pixels since that is the maximum size allowed using maxsize.

  • If the size assigned to a chart is very large, the chart may not display. If you find that no charts are displaying, try a smaller chart size.
  • This element is not available from the ArcIMS Author interface.

Attribute Descriptions for CHARTSYMBOL

Attribute Usage
antialiasing Used to make edges of labels and symbols smoother. When set to "true", antialiasing is active. Note that the time to generate a map may significantly increase when antialiasing is turned on.
maxsize Maximum size of chart if size or sizefield is not used.
maxvalue Maximum value that corresponds to the maximum chart size in maxsize.
minsize Minimum size of chart if size or sizefield is not used.
minvalue Minimum value that corresponds to the minimum chart size in minsize.
mode Type of chart: pie or bar.
outline Outline color of charts using RGB values.
shadow Shadow color using RGB values.
size Size of charts. All charts are the same size.
sizefield The field in the database containing the size of the chart. The field can be in the layer table or in a joined table. Performance is generally better if the field name is all upper case.
  • For shapefiles with no joined tables, the field can be referenced using the short format.
    sizefield="AREA"
  • For shapefiles with joined tables, the name of the joined table must be included along with the field.
    sizefield="JOINEDTABLE.AREA"
  • For ArcSDE layers without joined tables, the field can be referenced using the short format.
    sizefield="AREA"
    The fully qualified name can also be used.
    sizefield="ARCSDENAME.TABLE.AREA"
  • For ArcSDE layers with joined tables, joined fields must be referenced using the fully qualified format.
    sizefield="ARCSDENAME.TABLE.AREA"
Works only with Image Services. Does not work with Feature Services.
transparency Value to set percentage of transparency. 1.0 is 0 percent transparent. 0.0 is 100 percent transparent.
width The width represents a fixed width of for bars in a bar chart and a fixed diameter in pie charts. Units are pixels.
Back to top  

Examples for CHARTSYMBOL

Example 1: Using minsize, minvalue, maxsize, and maxvalue attributes.
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <CONFIG>
    <ENVIRONMENT>
      <LOCALE country="US" language="en" variant="" />
      <UIFONT color="0,0,0" name="Arial" size="12" style="regular" />
      <SCREEN dpi="96" />
    </ENVIRONMENT>
    <MAP>
    <PROPERTIES>
      <ENVELOPE minx="-127.87777503188939" miny="30.378245451392196" maxx="-101.1629831289576" maxy="48.55733555119212" name="Initial_Extent" />
      <MAPUNITS units="decimal_degrees" />
      <FILTERCOORDSYS id="4326" />
      <FEATURECOORDSYS id="4326"/>
    </PROPERTIES>
    <WORKSPACES>
      <SHAPEWORKSPACE name="shp_ws-0" directory="<path to USA ESRIDATA>" />
    </WORKSPACES>
    <LAYER type="featureclass" name="States" visible="true" id="0">
      <DATASET name="states" type="polygon" workspace="shp_ws-0" />
        <GROUPRENDERER>
          <SIMPLERENDERER>
            <SIMPLEPOLYGONSYMBOL fillcolor="127,127,27" />
          </SIMPLERENDERER>
          <SIMPLELABELRENDERER field="POP1999 POP1990">
            <CHARTSYMBOL minsize="10" minvalue="1000000" maxsize="50" maxvalue="7000000" outline="255,255,255" shadow="0,0,0" transparency="1.0" >
              <CHARTVALUE lookupfield="POP1990" color="255,0,0" />
              <CHARTVALUE lookupfield="POP1999" color="0,0,255" />
            </CHARTSYMBOL>
          </SIMPLELABELRENDERER>
        </GROUPRENDERER>
      </LAYER>
    </MAP>
  </CONFIG>
</ARCXML>

Example 2: Using an ArcSDE layer and the size attribute.
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <CONFIG>
    <ENVIRONMENT>
      <LOCALE country="US" language="en" variant="" />
      <UIFONT color="0,0,0" name="Arial" size="12" style="regular" />
      <SCREEN dpi="96" />
    </ENVIRONMENT>
    <MAP>
      <PROPERTIES>
      <ENVELOPE minx="-127.34083168343714" miny="27.246314948863663" maxx="-97.31362835016226" maxy="50.018623517052" name="Initial_Extent" />
      <MAPUNITS units="decimal_degrees" />
      <FILTERCOORDSYS id="4326" />
      <FEATURECOORDSYS id="4326"/>
      </PROPERTIES>
      <WORKSPACES>
        <SDEWORKSPACE name="sde_ws-4" server="ARCSDENAME" instance="port:5151" user="SDE" encrypted="true" password="OCOBLVWKFCAEHC" />
      </WORKSPACES>
      <LAYER type="featureclass" name="SDE.US_STATES" visible="true" id="0">
      <DATASET name="SDE.US_STATES" type="polygon" workspace="sde_ws-4" />
      <GROUPRENDERER>
        <SIMPLERENDERER>
          <SIMPLEPOLYGONSYMBOL fillcolor="27,27,227" />
        </SIMPLERENDERER>
          <SIMPLELABELRENDERER field="SDE.US_STATES.POP1999 SDE.US_STATES.POP1990">
            <CHARTSYMBOL size="30" >
              <CHARTVALUE lookupfield="SDE.US_STATES.POP1990" color="255,0,0" />
              <CHARTVALUE lookupfield="SDE.US_STATES.POP1999" color="0,0,255" />
            </CHARTSYMBOL>
          </SIMPLELABELRENDERER>
      </GROUPRENDERER>
      </LAYER>
    </MAP>
  </CONFIG>
</ARCXML>

Example 3: Using sizefield with the field in a joined DBF file.
<?xml version="1.0" encoding="UTF-8"?>
<ARCXML version="1.1">
  <CONFIG>
    <ENVIRONMENT>
      <LOCALE country="US" language="en" variant="" />
      <UIFONT color="0,0,0" name="Arial" size="12" style="regular" />
      <SCREEN dpi="96" />
    </ENVIRONMENT>
    <MAP>
    <PROPERTIES>
      <ENVELOPE minx="-127.87777503188939" miny="30.378245451392196" maxx="-101.1629831289576" maxy="48.55733555119212" name="Initial_Extent" />
      <MAPUNITS units="decimal_degrees" />
      <FILTERCOORDSYS id="4326" />
      <FEATURECOORDSYS id="4326"/>
    </PROPERTIES>
    <WORKSPACES>
      <SHAPEWORKSPACE name="shp_ws-0" directory="<path to USA ESRIDATA>" />
    </WORKSPACES>
    <LAYER type="featureclass" name="States" visible="true" id="0">
      <DATASET name="states" type="polygon" workspace="shp_ws-0" />
        <SPATIALQUERY where="states.SUB_REGION='Mtn'" joinexpression="To=[states.STATE_FIPS],From=[relatefile.STATE_FIPS],Type=[scan]" jointables="relatefile" />
       <GROUPRENDERER>
          <SIMPLERENDERER>
            <SIMPLEPOLYGONSYMBOL fillcolor="127,127,27" />
          </SIMPLERENDERER>
          <SIMPLELABELRENDERER  field="POP1990 POP1999 RELATEFILE.CHARTSIZE">
            <CHARTSYMBOL mode="bar" sizefield="RELATEFILE.CHARTSIZE" transparency="1.0" >
              <CHARTVALUE lookupfield="POP1990" color="255,0,0" />
              <CHARTVALUE lookupfield="POP1999" color="0,0,255" />
            </CHARTSYMBOL>
          </SIMPLELABELRENDERER>
        </GROUPRENDERER>
      </LAYER>
    </MAP>
  </CONFIG>
</ARCXML>

Back to top

Search code: @arcxml_CHARTSYMBOL

Search code: @CHARTSYMBOL
   


你可能感兴趣的:(arc)