Changing the Graph Type

24-22 Web User Interface Developers Guide for Oracle Application Development Framework Example 24–4 Categorical Data Value Names in Page Definition File graph IterBinding=EmpView1Iterator id=EmpView1 xmlns=http:xmlns.oracle.comadfmdvt type=BAR_VERT_CLUST graphDataMap leafOnly=true series data item value=Bonus data series groups item value=Hiredate groups graphDataMap graph For each categorical attribute to be formatted, use the dvt:attributeFormat tag to specify the name of the categorical data value, and specify the child converter tag to be used when formatting the attribute. You can use af:convertNumber, af:convertDateTime, and af:convertColor to specify formatting for a categorical attribute. For example, you can format the hire date and bonus categorical data values defined in the page definition file in Example 24–4 . To format categorical data values defined in a page definition file: 1. In the Structure window, right-click the bar graph tag and choose Insert inside dvt:barGraph ADF Data Visualizations Attribute Format .

2. In the Property Inspector, for the Name attribute, enter Hiredate as the name of

the af1 category attribute. 3. In the Structure window, right-click the attribute format tag you named and choose Insert inside dvt:attributeFormat Convert Date Time.

4. In the Property Inspector, for the Pattern attribute, enter the formatting pattern for

the datetime string conforming to java.text.SimpleDateFormat. For the TimeZone attribute, enter the timezone to interpret any time information in the data string. 5. Repeat Steps 1-4 for the bonus category attribute, setting Bonus as the name of the af2 category attribute, adding an af:convertNumber converter, and formatting the attribute for currency. Example 24–5 shows the XML code that is generated if you format the categorical data values in a bar graph. Example 24–5 Formatting Categorical Data Values in a Bar Graph dvt:barGraph id=barGraph1 value={bindings.EmpView1.graphModel} subType=BAR_VERT_CLUST dvt:attributeFormat id=af1 name=Hiredate af:convertDateTime pattern = yyyy-MM-dd hh:mm:ss a timeZone=USPacific dvt:attributeFormat dvt:attributeFormat id=af2 name=Bonus af:convertNumber type = currency currencySymbol = dvt:attributeFormat dvt:barGraph