Customizing Tooltips in Graphs

Using ADF Graph Components 24-39 4. In the Property Inspector, select a value for the markerShape attribute.

24.7.4 Customizing Scatter Graph Series Markers

In scatter graphs, related data values in a series are represented by the data marker’s shape and color. You can separate marker shape and color from the series to display the interdependence of data values. For example, Figure 24–8 shows a scatter graph that uses City and Product attributes collectively to determine the series represented by the data marker’s shape and color. Figure 24–8 Scatter Graph with Series Marker The row header attributes can be used to override the default series specification. Figure 24–9 shows a scatter graph that displays the data values for the City attribute mapped to shapes and the Product attribute mapped to colors. Figure 24–9 Scatter Graph with Series Item Markers Use the following attributes to customize the scatter graph series markers: ■ markerShape - Specifies the row header attribute name to use to set the marker color. The graph will display the default index based series marker colors if this attribute is not specified. ■ markerColor - Specifies the row header attribute name to use to set the marker shape. The graph will display the default index based series marker shapes if this attribute is not specified. For example, specify City and Product as separate series item markers using this code: 24-40 Web User Interface Developers Guide for Oracle Application Development Framework dvt:scatterGraph markerColor=Product markerShape=City value={bindings.View1.graphModel}

24.8 Adding Specialized Features to Graphs

There are graph customization features that include the ability to define series-related reference lines and axis-related reference areas, the option of adding gradient special effects to several parts of a graph, the option of setting some parts of a graph to transparent colors, and the use of alerts and annotations in graphs. These special features also let you use interactive capabilities of the graph.

24.8.1 Adding Reference Lines or Areas to Graphs

Reference lines and areas can be set to display always, on rollover only, or never, regardless of how many there are and whether they are associated with a series or an axis. You can create reference lines that are associated with a series that is a set of data values that appears as a single color in the graph legend. If there are multiple series with reference lines, then the reference lines show only when you move the cursor over a series marker or the corresponding series legend item. This is because multiple reference lines can be confusing to users. You can also create reference areas that are associated with an axis. Typically, these areas are associated with a y-axis. If there are multiple reference areas, then these areas are also displayed when you move the cursor over the related axis. If your application does not know how many reference lines or areas it will need until it is running, then you can create reference lines or areas dynamically at runtime.

24.8.1.1 How to Create Reference Lines or Areas During Design

Both reference lines and reference areas are created by the use of the following tags: ■ dvt:referenceObjectSet: Wraps all the reference object tags for reference lines or reference areas for this graph. ■ dvt:referenceObject: Identifies whether the tag represents a reference line or a reference area and specifies characteristics for the tag. To add reference lines or areas to a graph during design: 1. In the Structure window, right-click the graph node and choose Insert inside dvt:typeGraph ADF Data Visualization Reference Object Set. 2. If you are defining reference areas related to specific axes, then specify a value for the appropriate axis or axes attributes: displayX1, displayY1, or displayY2. The value RO_DISPLAY_AUTOMATIC enables the display of a reference area only when the mouse moves over the related axis. This choice prevents the confusion that might occur if multiple reference areas were displayed all the time. Optionally, you can apply a gradient special effect to the reference area. For more information see Section 24.8.2.1, How to Add Gradient Special Effects to a Graph. 3. In the Structure window, right-click the dvt:referenceObjectSet node and choose Insert inside dvt:referenceObjectSet Reference Object. 4. In the Property Inspector, do the following: