Oracle Fusion Middleware Data Visualization Tools Tag Reference for Oracle ADF Faces
12c (12.1.2)

E23187-01

<dvt:legendSection>

dvt:legendSection legendSection legend section

UIComponent class: oracle.adf.view.faces.bi.component.legend.UILegendSection
Component type: oracle.dss.adf.legend.LegendSection

The legendSection is a component which is used to display a list of marker and label pairs. It is displayed when within a <dvt:legend> tag. Use the source attribute to specify the id of a supported stamped component to include its items in that section of the legend. Supported stamps include:

A label for the generated legend item is specified within the stamp. For the case of attributeGroups, use the label property on <dvt:attributeGroups> to specify the text that should appear in the legend. For markers and areas, use <f:attribute> as a child of the stamp to specify the label, as in Example 1 below. Pointing to a <dvt:attributeGroups> stamp will include the unique items in the legend for that particular attribute type or set of types. This allows for different labels to be assigned to different attribute types, as seen in Example 2 below. The legend supports color, shape, scaleX, scaleY, pattern, and opacity. These usages are best explained through examples as seen below.

Example 1: Marker

To include a marker or area as an item in the legend, point the "source" attribute of a legendSection to the id of the marker or area component. Add <f:attribute> as shown below to annotate the marker with a label to be used in the legend.

               
<dvt:thematicMap id="map" basemap="usa">        
    <dvt:legend id="l1" label="Legend Title">
        <dvt:legendSection id="ls1" label="Legend Subtitle 1" source="al1:adl1:marker1" />
    </dvt:legend>
    <dvt:areaLayer id="al1" layer="states">
     <dvt:areaDataLayer id="adl1" value=" " var=" " ...>
        <dvt:areaLocation id="dataLoc" name="#{row.name}">
            <dvt:marker id="marker1">
                <f:attribute name="legendLabel" value="Important Location" />
            </dvt:marker>
        </dvt:areaLocation>
     </dvt:areaDataLayer>
    </dvt:areaLayer>
</dvt:thematicMap>
             
Example 2: Attribute Groups

To select a particular set of attribute types (color, shape, etc.) to include in the legend as a separate section, point the "source" attribute of a legendSection to the id of the desired attributeGroups component. Use the "label" attribute on attributeGroups as shown below to annotate this set of attributes with a label to be used in the legend.

<dvt:thematicMap >        
    <dvt:legend id="l1" label="Legend Title">
        <dvt:showLegendGroup id="slg1" label="Legend Subtitle 2">
            <dvt:legendSection id="ls2" source="al1:adl1:attributeGroupColor" />
            <dvt:legendSection id="ls3" source="al1:adl1:attributeGroupShape" />
        </dvt:showLegendGroup>
    </dvt:legend>
    <dvt:areaLayer id="al1" layer="states">
     <dvt:areaDataLayer id="adl1" value=" " var=" " ...>
        <dvt:areaLocation id="dataLoc" name="#{row.name}">
            <dvt:marker id="marker1"... >
                <dvt:attributeGroups id="attributeGroupColor" type="color" label="#{row.category1Label}" ... />
                <dvt:attributeGroups id="attributeGroupShape" type="shape" label="#{row.category2Label}" ... />
            </dvt:marker>         
        </dvt:areaLocation>
     </dvt:areaDataLayer>
    </dvt:areaLayer>
</dvt:thematicMap>
               

Screen Shot(s)


No image.

Events

Type Phases Description
org.apache.myfaces.trinidad.event.AttributeChangeEvent Invoke Application,
Apply Request Values
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.

Attributes

Name Type Supports EL? Description
attributeChangeListener javax.el.MethodExpression Only EL a method reference to an attribute change listener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.
binding String Only EL Binding reference to store the UILegendSection component
id String Yes The identifier for the component
label String Yes The optional title text of this legend section
rendered boolean Yes Default Value: true

Specifies whether the component is rendered. The default value is true.
source String Yes The component id of the stamped item which will expand to a list of marker-label pairs within this section.