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

E23187-01

<dvt:mapBarGraphTheme>

mapBarGraphTheme map bar graph theme


The Bar Graph Theme tag is used within the <dvt:map> tag to provide the ability to show statistics related to given locations on a map. This theme displays a bar graph at points to represent data values associated with those locations. For example, this tag might be used to display a bar graph at warehouse locations to show inventory levels at each warehouse.

When a Bar Graph Theme is created, default colors are assigned to the bars in the graph. These colors can be customized with built-in styles or by using the mapBarSeriesSet and the mapBarSeriesItem tags.

Only one Graph Theme (Bar or Pie) can be visible in a map at a given time

Model

The Bar Graph Theme uses an underlying model to abstract the data that gets displayed in the theme. The specific model class is oracle.adf.view.faces.bi.model.GeoMapDataModel . The GeoMapDataModel contains information about the location and data associated with each bar graph. The model can be set through the value attribute of the mapBarGraphTheme tag.

Bar Graph Styles

Styles can be applied to the Bar Graph Theme to customize the color scheme of the bars. This is done with the styleName attribute. This attribute can be set to either the name of one of the predefined styles or the path of a custom XML file that defines the desired style. To set the color of each bar individually, use the mapBarSeriesSet and mapBarSeriesItem tags.

In the example below, the Bar Graph Theme uses the predefined "Autumn" style

            <dvt:map ...map attributes...> 
              <dvt:mapBarGraphTheme id="mapBarGraphTheme1" themename="MAP_STATES_NAME"
                  locationColumn="POLYGON_NAME" value="#{backingBean.geoMapModel}" stylename="Autumn"/>
            </dvt:map>
            

Connection to Base Map Themes

The base map theme on which this Bar Graph Theme layer is based is specified by the themeName attribute. This base map theme must come from the same data source as the base map.

If you are using Oracle's hosted eLocation services to configure the Map component, the themeName attribute for this tag should be set to one of the following five choices:

Depending on the base map theme you choose your data model should have the corresponding polygon names. If you choose MAP_STATES_ABBRV then your data model must have state abbreviations for matching the rows with the appropriate polygons.

Legend Customization

By default, the ID of the mapBarGraphTheme is used as the label when that theme is displayed in the legend or in the Theme Selection dialog. However, each mapBarGraphTheme tag has the following attributes that serve as optional labels for the theme:

The labels for each bar color in the legend are determined by the labels that were used to create the GeoMapDataModel for this theme.

Selection

The Bar Graph Theme supports the ability to select one or more bar graphs on the map using the mapToolbar's rectangle/circle/polygon/point selection tools. When the user defines a selected area on the map, any of the bar graphs that fall within the selected area will be highlighted and the selectionListener will be fired.

Relationship with other tags

The <dvt:mapBarGraphTheme> tag is a child of the <dvt:map> tag

The <dvt:mapBarGraphTheme> tag can have the following children:

Deprecated children:

Events

Type Phases Description
oracle.adf.view.faces.bi.event.MapSelectionEvent Apply Request Values MapSelectionEvent is fired when the user finishes selecting a region on the map, or when the user unselects the region. The rectangle tool, circle tool, polygon tool, or point tool can be used to select a region, and right clicking on the map will unselect it
oracle.adf.view.faces.bi.event.MapClickActionEvent Apply Request Values MapClickActionEvent is fired when the user left clicks or right clicks on an element of the theme.

Attributes

Name Type Supports EL? Description
id java.lang.String no The identifier for the component
themeName java.lang.String yes Specifies the predefined theme on which this theme layer is based. The theme has to be coming from the same data source as the base map. The theme is defined in mapbuilder. For detail, refer to the documentation of mapviewer.
styleName java.lang.String yes

Applies a style to the slices of the bars based on the specified XML file. Valid values are the name of a standard style or the path of a custom XML file that you want to set as a style for this map.

Predefined map styles are:

  • April
  • Autumn
  • Black and White
  • Comet
  • Confetti
  • Earth
  • Executive
  • Financial
  • Glass
  • Nautical
  • Projection
  • Regatta
  • Southwest
  • Transparent
shortLabel java.lang.String yes Specifies the label of this theme on the legend. If the attribute is not specified, the id of the theme will be used as the label on the legend.
menuLabel java.lang.String yes Specifies the label of this theme on the ThemeSelectionDialog and SelectMenuItem. If the attribute is not specified, the id of the theme will be used.
minZoom int yes Specifies the minimum zoom scale where this theme will still be visible.
maxZoom int yes Specifies the maximum zoom scale where this theme will still be visible.
barWidth int yes Specifies the width of the bar chart. The default value is 40.
barHeight int yes Specifies the height of the bar chart. The default value is 40.
showXAxis boolean yes Specifies whether to show X axis of the bar graph or not. The default value is true.
rendered boolean yes Specifies whether the theme is rendered or not. The default value is true.
clickListener java.lang.String no a method reference to a click listener Refers to a backing bean method that takes MapClickActionEvent as an argument. The MapClickActionEvent contains the information on the clicked point. Sample code:
public void processMouseClick(MapClickActionEvent mapClickActionEvent) {
    if (mapClickActionEvent.getDataContent() != null)
    {
        DataContent dt = mapClickActionEvent.getDataContent();
        System.out.println ("Location Name: " + dt.getLocationName());
    }
        
    System.out.println("MouseX " + mapClickActionEvent.getMouseX()); 
    System.out.println("MouseY " + mapClickActionEvent.getMouseY());         
}
        
Refers to a backing bean method that takes ClickEvent as argument.
clickAction java.lang.String no Refers to a backing bean method that performs navigation processing for the map and returns an outcome String. Or a static outcome String can be specified. The JSF NavigationHandler selects the page to display next by matching the outcome String against the navigation rules in the application configuration resource file. The application writes the Navigation rules.
leftClickBehavior java.lang.String yes Specifies the behavior when user left clicks on an element of a theme. Valid value of theme are:
  • "Action" - An action event will be fired.
  • "Popup" - A popup will be shown. The content of the popup is defined in the popup facet of the map
  • "InfoWindow" (Default) - An InfoWindow will be shown. The user can further customize the content of the infoWindow through the infoWindowCallback
  • "None" - Nothing will be done.
rightClickBehavior java.lang.String yes Specifies the behavior when user right clicks on an element of a theme. Valid value of theme are:
  • "Popup" - A popup will be shown. The content of the popup is defined in the rtPopup facet of the map
  • "None" (Default) - Nothing will be done.
selectionListener java.lang.String no a method reference to a selection listener Refers to a backing bean method that takes MapSelectionEvent as an argument. The MapSelectionEvent contains the information on the selected region. Sample code:
 public void processSelection(MapSelectionEvent mapSelectionEvent) {
     Iterator iterator = mapSelectionEvent.getIterator();
        
     while (iterator.hasNext())
     {
         DataContent dt = (DataContent)iterator.next();    
         String selectedLocation = dt.getLocationName();
         System.out.println (selectedLocation);
     }                        
}                
        
infoWindowCallback java.lang.String no Specifies a callback for overriding the default text in the info Window.
useWindow boolean yes Specifies whether processes launched by this command should be launched in a secondary dialog window. 'useWindow' works only in the case of dialogs i.e, if the "action" starts with a "dialog:". Set useWindow to 'false' for the dialog to be opened in the existing window. It is false by default.
windowWidth int yes Specifies the width of the window if useWindow is true. It is -1 by default.
windowHeight int yes Specifies the height of the window if useWindow is true. It is -1 by default.
locationColumn java.lang.String yes Specifies the name of a polygon in a column of the underlying table of the theme. This column is used to join with the location column in the mapModel of the value attribute.
value java.lang.String yes Specifies the data model for theme - have to be an instance of oracle.adf.view.faces.bi.model.GeoMapDataModel
scaling java.lang.String yes Scaling factor for numbers that are displayed Valid values are:
  • none - (Default) The number will not be scaled
  • thousand - Scales the number to thousands.
  • million - Scales the number to millions.
  • billion - Scale the number to billions.
  • trillion - Scale the number to trillions.
  • quadrillion - Scale the number to quadrillions.