Charting Classes

This chapter provides an overview of the PeopleSoft charting classes and discusses:

Click to jump to parent topicUnderstanding the Charting Classes

PeopleTools delivers four charting classes. One general charting class supports a range of standard chart types, and three specialized charting classes address specific charting needs. Each charting class is discussed in detail in following sections.

The charting classes are:

The following examples show each of the four chart classes:

This chart was created from the Chart class with a chart type of 2D Bar:

This example shows a Gantt chart:

This example shows an organization chart:

This example shows a rating box chart:

See Also

Creating PeopleSoft Charts

Using the Chart Class

Using the Gantt Class

Using the OrgChart Class

Using the RatingBoxChart Class

Click to jump to parent topicCreating PeopleSoft Charts

This section discusses the process of creating charts using any of the PeopleSoft charting classes. Further details can be found in the specific section for each chart class.

These topics relate to all of the charting classes:

Click to jump to top of pageClick to jump to parent topicCreating a Chart on a Page

This section summarizes the basic steps to create a chart. The basic steps are essentially the same for all four charting classes.

At the end of this chapter are examples of charts with step-by-step instructions and complete PeopleCode programs.

The Chart class section has fundamental, detailed instructions for creating a chart using the Chart class. Each specialized class – Gantt class, OrgChart class, and RatingBoxChart class – has detailed instructions that build on the Chart class instructions.

See Creating a Chart Using the Chart Class, Using the Chart Class, Using the Gantt Class, Using the OrgChart Class, Using the RatingBoxChart Class.

Note. The following steps are for creating a chart on a PeopleSoft Pure Internet Architecture page. You can also create a chart for a web page using an iScript. Only Chart class charts or Gantt class charts can be created using an iScript.

See Creating a Chart Using an iScript.

To create a chart on a page:

  1. In Application Designer, place a chart control on a page and associate the chart with a record field.

  2. Create a record to hold your chart data.

    For charts made using the OrgChart class and the RatingBoxChart class, you also create a record that controls the appearance of the chart. Place each record on a level-1 grid on the page so the chart records are present in the component buffer at runtime. You can optionally hide the grid. You can also optionally place the grid on another page on the same component.

    Place the page on a component and register the component.

  3. Add PeopleCode, probably on the page Activate event, to instantiate the chart object and associate it with the page control.

    For example, this is the minimum PeopleCode to create a bar chart using the Chart class.

    /* Declare a chart object */ Component Chart &cChart; /* Instantiate the chart object and associate the chart ** with the chart page control */ &cChart = GetChart(SC_CHART_DUMREC.QE_CHART_FIELD); /* Specify the chart data record and specify the record ** fields for the X-Axis data and Y-Axis data*/ &cChart.SetData(Record.SC_CHART_RECORD); &cChart.SetDataXAxis(SC_CHART_RECORD.SC_PRODUCT); &cChart.SetDataYAxis(SC_CHART_RECORD.SC_SALES);

  4. View the chart in the browser.

    Suppose you have this data in SC_CHART_RECORD:

    Region

    Sales

    Arizona

    62

    California

    50

    Oregon

    42

    Washington

    30

    This is the bar chart generated by the example code and data. The default chart type for the Chart class is a bar chart. Since no colors are specified, the chart uses the default colors.

  5. Add PeopleCode to control the behavior of the chart or to modify its appearance at runtime. For example, for a bar chart you might add FieldChange PeopleCode to the Y-axis field on your data record to display information when a user clicks a data point.

    See Adding Drilldown.

    You can also add FieldChange PeopleCode to a Gantt chart, organization chart, or rating box chart to enable the user to interact with the chart.

See Also

Creating a Chart Using the Chart Class

Using the Chart Class

Using the Gantt Class

Using the OrgChart Class

Using the RatingBoxChart Class

Click to jump to top of pageClick to jump to parent topicCreating a Chart Using an iScript

If possible, you should put a chart on a page definition. If not possible, then you can build a chart at runtime using an iScript and call the chart using a URL. Use the CreateObject function in the iScript instead of the GetChart function. You can then use the GetChartURL Response class method to use the URL in your application.

Note. You can create only Chart class and Gantt class charts using an iScript. OrgChart class and RatingBoxChart class charts cannot be created with an iScript.

For example, this PeopleCode would build a chart using a standalone rowset:

Function IScript_GetChartURL() local object &MYCHART; local string &MYURL; &MYCHART = CreateObject("Chart"); &MYCHART.SetData(xx); /* xx will be a data row set */ &MYURL = %Response.GetChartURL(&MYCHART); /* use &MYURL in your application */ ... End-Function;

See Also

Creating a Chart Using an iScript

Click to jump to top of pageClick to jump to parent topicFont Considerations

For Chart class charts and Gantt class charts, the environment variable JAVA_FONTS must be set correctly so the fonts that are used in charting can be picked up by the application server's Java Virtual Machine. It must be set to include the paths to any TrueType fonts that are used to support extended languages. You can set this variable at the system level or in psconfig.sh.

The following is an example of this variable being set:

JAVA_FONTS=$PS_HOME/jre/lib/fonts:/usr/share/fonts/default/TrueType:/usr/share /fonts/ja/TrueType:/usr/share/fonts/zh_CN/TrueType:/usr/share/fonts/zh_TW/TrueType :/usr/share/fonts/ko/TrueType;export JAVA_FONTS

Click to jump to top of pageClick to jump to parent topicComponent Processor Considerations

Sometimes, records at level zero on a page are considered work records, even when they are not specified as such in PeopleSoft Application Designer. Work records are not updated by the database and are skipped when the component is run.

A level-zero record is marked as a work record when any of these conditions is true:

When a chart field is attached to a level-zero record field of a record considered to be a work record, it is also skipped when the system determines that record's 'work' status.

See Also

Referencing Data in the Component Buffer

Click to jump to top of pageClick to jump to parent topicTranslation Considerations

If you hard code a value for a label, a title, a data hint, and so on, then that value is not translated. Be sure to specify field values as message catalog entries that will be translated.

Click to jump to top of pageClick to jump to parent topicLabel Considerations

The appearance of Chart class chart labels is based on the size of the axis, fonts, and charts on the page. If all the labels for your chart do not appear, then you should either make the chart larger or the font smaller.

Pie chart labels are staggered, so that, in most cases, both labels can be read. However, if one or both of the labels are very long, they could be truncated or completely missing from the chart.

For Gantt charts, use double quotes to correctly display the use of single quotes in your label, if applicable.

Click to jump to top of pageClick to jump to parent topicStyle Sheets

A style sheet is a definition, like a record definition or field definition, that you create in PeopleSoft Application Designer. It contains a collection of formatting styles, called style classes, each of which can be applied to either the entire chart or to specific elements within a chart.

The following style sheet properties are supported for PeopleSoft charting:

You can use a style sheet, and the style classes in a style sheet, for the different parts of a chart. You can specify a style sheet for the entire chart (using either the chart Style or StyleSheet property) and for an element (using that element's style property.)

Click to jump to top of pageClick to jump to parent topicUsing Style Sheets with RevertToPre850

How your chart uses style sheets is very different depending on whether you want your chart to use the PeopleTools Version 8.50 appearance or the pre-8.50 appearance.

The overall look of charts changed with the introduction of new style sheets and colors in PeopleTools Version 8.50. The way style sheets are applied to charts changed at the same time.

If you want your chart to use the pre-8.50 look, set the RevertToPre850 Chart class or Gantt class property to True. If the RevertToPre850 property is not set or is set to False, then your chart will use the PeopleTools Version 8.50 look. By default, the property is False.

Warning! By default, all charts use the new 8.50 chart style classes, including charts that were created before PeopleTools Version 8.50.

Any custom Chart class properties or Gantt class properties that were set in PeopleCode for existing charts that use the new 8.50 chart style classes will be ignored if those properties are defined in the 8.50 chart style classes.

A new property, RevertToPre850, enables you to maintain the pre-8.50 visual style of an existing chart. If you want an existing chart to use pre-8.50 style classes, you must set the chart property RevertToPre850 to True.

RevertToPre850 is not available for charts created using the OrgChart class or the RatingBox class. These chart classes were introduced in PeopleTools Version 8.50.

See RevertToPre850, PeopleTools Options.

PTSTYLEDEF Style Sheet

The default style sheet associated with a Chart class chart or Gantt class chart with RevertToPre850 set to True is PTSTYLEDEF.

The chart style classes associated with the PTSTYLEDEF style sheet include:

Chart Element

Style Class Name

Style

XAxisStyle

YAxisStyle

LegendStyle

Also controls the chart section of the Gantt chart

PSCHARTDEFAULT

MainTitleStyle

PSCHARTTITLE

XAxisTitleStyle

YAxisTitleStyle

PSCHARTAXISTITLE

Controls the table section of the Gantt chart

PSCHARTGANTTGRID

RevertToPre850 Override Rules

The application style sheet, which is specified on the PeopleTools Options page, controls the formatting of all charts in an application unless it is overridden.

The override rules are:

  1. If you specify the style property for any element (XAxisStyle, XAxisTitleStyle, YAxisStyle, YAxisTitleStyle, LegendStyle, MainTitleStyle, and so on), then the style is used.

  2. If you do not specify the style property for any element of a chart object but you specify the StyleSheet property for the chart object itself, then that style sheet is used for the unspecified elements.

  3. If you do not specify styles for any elements of a chart object and you do not specify a style sheet for the chart object itself, then a default style sheet is used.

Note. Oracle recommends not using your own style classes or style sheets unless absolutely necessary. If you modify styles you must test changes in all supported browsers. Some changes can have different effects in different browsers.

See Also

Using Style Sheets with Gantt Charts

Creating Style Sheet Definitions

Considerations for Gantt Charts

Click to jump to top of pageClick to jump to parent topicUsing Style Sheets with PeopleTools Version 8.50 Charts

This section describes how to use style sheets if you have not set the RevertToPre850 property or have set the property to False.

The application style sheet, which is specified on the PeopleTools Options page, controls the formatting of all charts in an application unless it is overridden.

The override rules are:

  1. If a style sheet is specified for the Chart object or Gantt object using the StyleSheet property, then use this style sheet. (The StyleSheet property only applies to Chart class and Gantt class charts. OrgChart class and RatingBoxChart class charts do not use the StyleSheet property.)

  2. If no style sheet is specified for the chart object but the style sheet is specified for the page in Application Designer, then use the style sheet on the page as the style sheet of the chart.

  3. If no page style sheet is specified, then use the style sheet specified on the PeopleTools Options page.

  4. If no style sheet is specified on the PeopleTools Options page, use the default style sheet, PTSTYLEDEF.

Modifying Style Classes

You modify the appearance of a chart by modifying the style classes that control the appearance. The steps you follow to modify styles depends on the extent of your modification. You can, for instance, modify every style in every chart in your application, or you can modify just one style for a single chart.

The following table summarizes the changes to style sheets and style classes depending on the extent of the modification you intend to make.

Note. Do not change the delivered style sheets. Oracle recommends that you use the default styles wherever possible.

Extent of Modification

Steps

All charts in the application

  1. Clone a style sheet, probably the default style sheet.

    For example, in Application Designer open the style sheet PTSTYLEDEF and save it as MySTYLEDEF.

  2. Modify the style classes in the new style sheet.

  3. Specify the new style sheet on the PeopleTools Options page.

See PeopleTools Options.

All charts on a page

(This method only applies to PeopleTools Version 8.50 charts.)

  1. Clone a style sheet, probably the default style sheet.

  2. Modify the style classes in the new style sheet.

  3. Specify the new style sheet on the chart page using the page properties dialog.

See Overriding the Default Page Style Sheet.

One chart

(This method uses the StyleSheet property, which is only used by the Chart class and the Gantt class.)

  1. Clone a style sheet, probably the default style sheet.

  2. Modify the style classes in the new style sheet.

  3. Specify the new style sheet using the Chart class or Gantt class StyleSheet property.

See StyleSheet.

One style attribute on one chart

  1. Clone a style sheet, probably the default style sheet.

  2. Copy and paste and rename a style class.

    For example, copy the style class PSCHARTTITLE. Paste and name the new class MYCHARTTITLE.

  3. Modify the new style class.

  4. Specify the new style sheet on the chart page using the page properties dialog.

    or

    Specify the new style sheet using the Chart class or Gantt class StyleSheet property (Chart class or Gantt class only).

    For example:

    &cChart.StyleSheet = STYLESHEET.&MyStyleDef;

  5. Assign the new style class to the corresponding style property.

    For example:

    &cChart.&cMyChart.MainTitleStyle = STYLESHEET.MYChartTitle;

Note. Oracle recommends not using your own styles or style sheets unless absolutely necessary.

See Creating Style Sheet Definitions, PeopleTools Options.

PSCHARTSTYLE

The style classes in PSCHARTSTYLE are used by the Chart class and the Gantt class.

Chart Colors

The following table lists all the colors that are defined in the PSCHARTSTYLE style sheet.

You assign colors to your chart using the Chart class and Gantt class color methods. You can use either the numeric or constant value.

Charts that have RevertToPre850 set to True use solid colors. Beginning with 8.50, charts use gradients.

Numeric Value

Constant Value

Description

–1

%ChartColor_Series_Default

Default series color. When a data point is set to this value, the default series color or the color set by the user for that series is used instead. This value works only with the SetColorArray method.

0

%ChartColor_Black

Black

1

%ChartColor_Blue

Blue

2

%ChartColor_Cyan

Cyan

3

%ChartColor_DarkGray

DarkGray

4

%ChartColor_Gray

Gray

5

%ChartColor_Green

Green

6

%ChartColor_LightGray

LightGray

7

%ChartColor_Magenta

Magenta

8

%ChartColor_Orange

Orange

9

%ChartColor_Pink

Pink

10

%ChartColor_Red

Red

11

%ChartColor_White

White

12

%ChartColor_Yellow

Yellow

13

%ChartColor_Red_Orange

Red_Orange

14

%ChartColor_Yellow_Green

Yellow_Green

15

%ChartColor_Blue_Violet

Blue_Violet

16

%ChartColor_Purple

Purple

17

%ChartColor_Yellow_Orange

Yellow_Orange

See SetColorArray, SetDataColor.

See SetActualTaskBarColor, SetPlannedTaskBarColor.

Considerations for Gantt Charts

In Gantt charts, the PSCHARTDEFAULT style class uses an 8-point font with a normal weight. This style class affects all text in the chart area, such as task labels, DateTime X-axis labels, and hints. The PSCHARTGANTTGRID style class uses a 10-point font with a normal weight, and it affects all text in the table area. For the font size between the table and chart areas to be the same, the point size in the PSCHARTGANTTGRID style class should be 1.25 times the point size of the font defined in PSCHARTDEFAULT. Note, however, that the font size for PSCHARTGANTTGRID should not exceed 13; otherwise, column text may bleed into another column.

OrgChart Class and RatingBoxChart Class Style Sheets

OrgChart class and RatingBoxChart class chart appearance attributes are controlled entirely using style classes.

To modify a style class you can either create a new style sheet or set style properties to new style classes.

To create a new style sheet:

  1. Clone the style sheet.

    For example, in Application Designer, open the PSORGCHART style sheet and save as MYORGCHART.

  2. Double-click a style class name and modify the values in the Class properties dialog.

  3. Assign the new style sheet to the page on which the chart is placed.

    In Application Designer, open the page and select File, Definition Properties.

    On the Use tab, in the Page Style Sheet field, select the new style sheet.

To set style properties to new style classes:

  1. Copy and paste to create a new style class within the style sheet that is associated with the chart.

    For example, copy and paste the PT_ORGCHART_TITLE style class and name it MY_ORGCHART_TITLE.

  2. Modify the new style class.

  3. Set the style property of the chart class to the new style class.

    For example:

    &ocMyOrgChart.MainTitleStyle = MY_ORGCHART_TITLE;

The PSORGCHART style sheet controls the appearance of organization charts.

The PSRATEBOX style sheet controls the appearance of rating box charts.

Click to jump to parent topicUsing the Chart Class

Use the Chart class to create charts that display data series in several common formats, including bar charts, line charts, pie charts, and bubble charts.

This section discusses:

Click to jump to top of pageClick to jump to parent topicChart Terms

The following is a list of Chart class terms and their descriptions:

Label

Text that identifies the data on one of the axes.

Legend

Text that identifies the different series in the chart.

Series

A grouping of related information. For example, if you were tracking sales for several divisions over many years, each division could be a series. Generally, every series in a chart has a distinct color. You can have more than one series in a chart for comparison. Each line in a line chart represents one series.

Overlay

Related data represented by a line drawn over the background chart. You can also specify data series, with different line types for each overlay.

Title

The three titles are Main, X axis, and Y axis. Each title identifies a portion of the chart.

TrueXY

A type of line chart that uses a numeric X axis instead of a categorical X axis. The numeric X axis supports non-uniform X data, that is, each series need not have the same number of points, and those points along the X axis need not match up across the series.

X axis

The axis that data is measured against.

Y axis

The axis that contains the data. In most charts, this is the vertical axis. In a horizontal bar chart, this is the horizontal axis.

Click to jump to top of pageClick to jump to parent topicCreating Charts Using the Chart Class

You can specify a rowset and have it graphed using a chart object with minimal PeopleCode. Within this rowset, one column must contain data for the X axis and another column must contain data for the Y axis. If more than one series of data is used, an additional column is required for each series. You can also set color and pop-up text for each point in this rowset using additional columns.

The following distinguishable types of data can be included in a chart:

Overlay data may be quite different from primary data, so an additional rowset is needed.

The only object used with the Chart class is a chart object. Sub-objects do not exist. All methods and properties are used with the Chart object.

For a conceptual overview, a chart is easier to view in pieces; however, these pieces do not represent sub-objects.

A chart contains the following major parts:

The X, Y, and Overlay axes have access to titles and labels associated with their data.

Click to jump to top of pageClick to jump to parent topicChart Class Chart Types

The following chart types are available for the Chart class:

See Also

Creating a Chart Using the Chart Class

Click to jump to top of pageClick to jump to parent topicData Type of a Chart Object

Chart objects are declared using the Chart data type. For example,

Local Chart &MyChart; Component Chart &Abs_Hist_Chart;

Click to jump to top of pageClick to jump to parent topicScope of a Chart Object

A chart object can be instantiated only from PeopleCode.

You can use this object only in PeopleCode programs that are associated with an online process, not in an Application Engine program, a message notification, a Component Interface, and so on.

Click to jump to top of pageClick to jump to parent topicError Handling

The PeopleCode program is terminated if a field or record is missing at runtime.

If a valid record is specified but no data is found, or for any other error, the chart is replaced by the message "Image creation failed."

If the Java Runtime Environment (JRE) is missing, an error appears and is logged.

Click to jump to top of pageClick to jump to parent topicChart Class Methods and Properties by Category

The following topics subdivide the Chart class methods and properties by functional category.

The categories are divided among the different parts of a chart. However, all methods and properties are used with the chart object; a chart has no sub-objects.

Chart Data Methods and Properties

Use chart data methods and properties to set X and Y axes data.

See Reset, SetData, SetDataHints, SetDataSeries, SetDataURLs, SetDataXAxis, SetDataYAxis, DataStartRow, DataWidth, ImageMap, IsTrueXY.

Chart Appearance Properties

Use chart appearance properties to set the type of graph, the line style, and so on.

See GridLines, GridLineType, Height, IsDrillable, IsPlainImage, LineType, RevertToPre850, Style, StyleSheet, Type, Width, XRotationAngle, YRotationAngle, ZRotationAngle.

Note. A new property, RevertToPre850, enables you to maintain the pre-8.50 visual style of an existing chart. If you want an existing chart to use pre-8.50 style classes, you must set the chart property RevertToPre850 to True.

See Using Style Sheets with RevertToPre850.

Chart Color Methods

Use chart color methods to set and manipulate colors for either a series or for each point.

See SetColorArray, SetDataColor.

Note. A new property, RevertToPre850, enables you to maintain the pre-8.50 visual style of an existing chart. If you want an existing chart to use pre-8.50 style classes, you must set the chart property RevertToPre850 to True.

See Using Style Sheets with RevertToPre850.

Chart Axis Methods and Properties

Use chart axis methods and properties to further control the appearance of axes.

See SetXAxisLabels, SetYAxisLabels, XAxisCross, XAxisLabelOrient, XAxisStyle, XAxisTicks, YAxisLabelOrient, YAxisMax, YAxisMin, YAxisStyle, YAxisTicks.

Chart Title Properties

Use chart title properties to set the text and style of titles for the graph and the axes.

See MainTitle, MainTitleOrient, MainTitleStyle, XAxisTitle, XAxisTitleOrient, XAxisTitleStyle, YAxisTitle, YAxisTitleOrient, YAxisTitleStyle.

Chart Legend Methods and Properties

Use chart legend methods and properties for each series legend.

See SetLegend, HasLegend, LegendMaxEntries, LegendPosition, LegendStyle.

Chart Overlay Methods and Properties

Use chart overlay methods and properties to set and manipulate overlay data.

See SetOLData, SetOLDataSeries, SetOLDataXAxis, SetOLDataYAxis, OLLineType, OLType.

Scatter Chart Methods and Properties

Use scatter chart methods and properties to set and manipulate scatter charts and bubble charts.

See SetDataAnnotations, SetDataGlyphScale, SetOLDataAnnotations, SetOLDataGlyphScale, ShowCrossHair.

TrueXY Line Chart Properties

Use trueXY line chart properties to set and manipulate trueXY line charts.

See XAxisCrossPoint, XAxisMax, XAxisMin, XAxisPrecision, XAxisScaleResolution, YAxisCrossPoint, YAxisMax, YAxisMin, YAxisPrecision, YAxisScaleResolution.

Click to jump to parent topicUsing the Gantt Class

Use the Gantt class to create Gantt charts. A Gantt chart displays tasks along a time line. Gantt charts are frequently used in project management because they provide a graphical illustration of a schedule, which helps in planning, coordinating, and tracking project tasks.

This section provides an overview of Gantt chart terminology and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding Gantt Chart Terms

Gantt charts can be composed of many different elements, such as a title, a label, and so on. The following terms apply specifically to Gantt charts:

Activity orTask

See Task.

Baseline

A point-in-time snapshot of the project plan that allows the user to identify how the project plan has changed since that point in time.

Data area

The part of the chart that graphically shows the span of dates that each task (or activity) covers. (This area is the right side of the displayed chart.)

Dependencies

A relationship between one task and other tasks that drives when tasks can begin and end. A dependent task cannot start before the task it is dependent on is either started or completed (depending on business rules defined in the application).

Milestone

A specialized mark on the chart that names a meaningful point in time.

Resource

A source of supply or support that is assigned to work on an activity or task.

Taskor Activity

In a Gantt chart, each row (task or activity), is represented in the Y axis of the chart, and the span of dates for each row is displayed on the X axis.

X axis

The X axis displays dates that are spanned by items in the Y axis.

X-axis labels

The part of the chart that lists the time scale. The X-axis labels support multiple levels of granularity: second, minute, hour, day, week, month, year.

Y axis

The Y axis is the display of tasks or activities, and is displayed as rows.

Y-axis labels

The part of the chart that lists activities and their attributes. Activities are shown hierarchically, and subtasks can be hidden or displayed by expanding or collapsing higher level tasks.

Click to jump to top of pageClick to jump to parent topicUsing Gantt Charts in PeopleSoft Pure Internet Architecture

The Gantt chart consists of two sections: a table section and a chart section.

The left side of the chart, where you see the table, is the table section. The other side, where you see the bars, is the chart section.

Horizontal scrollbars below the table section support scrolling through the task-related columns; below the task section, they support scrolling through the task bars.

The amount that a section scrolls depends on the value set for the SetTableXScrollBar method. Each click on the arrow scrollbar scrolls the task either left or right by the amount set with the SetTableXScrollBar method (or 10 percent of the section area if a value is not set).

See SetTableXScrollbar.

Vertical scrollbars support scrolling through the task hierarchy.

Table Section

The table section contains all of the tasks and associated subtasks, and displays them in a hierarchy. Tasks that contain subtasks are called parent tasks, and subtasks are called child tasks. You can click on the expand (collapse) image to the left of the task name (Baby, above) to expand or collapse the subtask hierarchy. Note that subtasks may also act as parent tasks to other subtasks.

Each task has a name (Born, Baby, Childhood, and so on). It also has a level. Parent tasks have a higher level than child tasks.

Chart Section

The chart section displays the tasks, task dependencies, and milestones graphically.

In the previous example, each horizontal bar represents a single task. The progress bar (that is, the percentage complete for a particular task) is indicated with a bar of a different color above the task bar. The milestone date (Graduate in the previous example) is represented with a circle.

You can also have dependencies between tasks. These are represented as lines connecting the task bars.

You can execute custom FieldChange PeopleCode when a user clicks a task bar or a task dependency line.

X-Axis Range

Click the X-Axis Range link on the Gantt toolbar to change the Begin and End dates for the X axis.

User Interaction

A user can interact directly with a chart to change the underlying chart data.

These user actions are supported:

When a user changes values in the chart section by dragging and dropping bars, the Planned Start, Planned End, and Progress values in the grid column will also be updated if the grid and the chart section use the same record and fields.

You can control the level the user is able to interact with the chart using the Gantt class properties InteractiveStart, InteractiveEnd, InteractiveProgress, and InteractiveMove.

See InteractiveStart, InteractiveEnd, InteractiveProgress, InteractiveMove.

Click to jump to top of pageClick to jump to parent topicCreating Gantt Charts Using the Gantt Class

Every Gantt chart has at least one data set used to define the tasks and the information related to each task, such as start date, end date, milestones, percent finished, and so on.

A second data set can be used to describe dependencies between tasks.

The following methods are required for using the Gantt chart:

Though not required, Oracle recommends using the SetTaskName method to display meaningful information in the table section of the Gantt chart.

If you only use the required methods and do not use the SetTaskAppData method, Oracle recommends that you also use the SetChartArea method and dedicate most, if not all, of the entire area to the chart, and not the table.

If you specify one actual date, either for start or end, then you must specify the other (SetActualStartDate, SetActualEndDate).

In addition, if you want to use dependency data, the following methods are required:

Click to jump to top of pageClick to jump to parent topicSpecifying DateTime Axis Formats

You can control the display of the label format that describes the DateTime axis in up to six different time increments, from seconds to years, or any combination thereof simultaneously for a given time period. Each time increment, if enabled through the DateTimeAxis specific methods, occupies a single level within the X-axis hierarchy. Smaller time increments display closer to the axis, while larger time increments display farther from the axis.

The following example shows the levels of the labels for the DateTime axis. The first level, in seconds, is the closest level to the chart edge; next are minutes, at the second level; and then hours, at the third level, and so on. Generally, the smallest unit should be on the lowest level. Therefore, if months and years appear, then months appear at the first level and years appear at the second level.

In the following example, days, months, and years are defined at levels 1, 2, and 3, respectively. Therefore, the days of the month (1, 10, 20) appear closest to the chart area, the months appear below them, and the years appear below that.

By default, the DateTime axis displays both the year and the months, with the major tick mark marking the months.

Note. The charting algorithm may or may not display a given time increment, even if it is enabled. The resolution of the given time increments may be too great, depending on the length of the time period defined in the chart section.

Click to jump to top of pageClick to jump to parent topicWorking with Start and End Dates

You must set the end date to be after the start date, for both the planned as well as actual dates, or else you will receive an error.

Both the start and end dates you specify for a task must fall within the axis dates, that is, the dates specified by the AxisEndDateTime and AxisStartDateTime properties. If you specify task dates that fall outside of the axis dates, the task appears in the table section of the Gantt chart, but no bar appears in the chart section of the Gantt chart, even if one of the dates falls inside the axis dates.

Click to jump to top of pageClick to jump to parent topicUsing Gantt Glyphs

You can use all of the following glyphs with a Gantt chart. You can use either the numeric or constant value.

Constant: %ChartGlyph_Axe

Numeric value: 1

Constant: %ChartGlyph_Bar

Numeric value: 2

Constant: %ChartGlyph_Box

Numeric value: 3

Constant: %ChartGlyph_Circle

Numeric value: 4

Constant: %ChartGlyph_Cross

Numeric value: 5

Constant: %ChartGlyph_Diamond

Numeric value: 6

Constant: %ChartGlyph_Dodecahedron

Numeric value: 7

Constant: %ChartGlyph_Icosahedron

Numeric value: 8

Constant: %ChartGlyph_Sphere

Numeric value: 9

Constant: %ChartGlyph_Square

Numeric value: 10

Constant: %ChartGlyph_Star

Numeric value: 11

Constant: %ChartGlyph_Triangle

Numeric value: 12

Click to jump to top of pageClick to jump to parent topicUsing Style Sheets with Gantt Charts

In Gantt charts, the PSCHARTDEFAULT style class uses an 8-point font with a normal weight. This style class affects all text in the chart area, such as task labels, DateTime X-axis labels, and hints. The PSCHARTGANTTGRID style class uses a 10-point font, also with a normal weight, and affects all text in the table area. For the font size between the table and chart areas to be the same, the point size in the PSCHARTGANTTGRID style class should be 1.25 times the point size of the font defined in PSCHARTDEFAULT. Note, however, that the font size for PSCHARTGANTTGRID should not exceed 13; otherwise, column text may bleed into another column.

Click to jump to top of pageClick to jump to parent topicData Type of a Gantt Object

Gantt objects are declared using the Gantt data type. For example,

Local Gantt &MyGantt;

Click to jump to top of pageClick to jump to parent topicScope of a Gantt Object

A Gantt object can be instantiated only from PeopleCode.

You can use this object only in PeopleCode programs that are associated with an online process, not in an Application Engine program, a message notification, a Component Interface, and so on.

Click to jump to top of pageClick to jump to parent topicError Handling

The PeopleCode program is terminated if a field or record is missing at runtime.

If a valid record is specified but no data is found, or for any other error, the chart is replaced by the message "Image creation failed."

If the Java Runtime Environment (JRE) is missing, an error appears and is logged.

Click to jump to parent topicUsing the OrgChart Class

Use the OrgChart class to create organization charts. An organization chart represents hierarchical data as boxes arrayed in levels, which can be oriented top to bottom, with horizontal rows, or left to right, with vertical rows. Connectors show parent and child relationships between boxes on adjacent levels.

You can use this chart type to display many different types of hierarchical relationships, including, but not limited to:

This section provides an overview of organization chart terminology and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding Organization Chart Terms

Organization charts can be composed of many different elements, such as the main chart, nodes, connectors, pop-up nodes, and so on. These terms apply specifically to organization charts:

Breadcrumbs

You can configure an organization chart to optionally display links at the top of an organization chart. Typically, these are the names of people in an organization hierarchy.

Button

See Drop-down list box.

Child node

A node that is one level below its parent node (except for the top-level node).

Every node except the top-level node has one parent node.

Connector

Lines that link the boxes in an organization chart. Connectors denote parent and child relationships. A connector also shows the relationship between a pop-up node and the predecessor node of the pop-up.

Descriptor

A text string that conveys information about a node. A main chart node has up to seven descriptors, and a pop-up node has up to eight descriptors. Each descriptor can have an image associated with it and can be configured as a link. On the main chart, a descriptor can also be configured as a button that is associated with a drop-down list box.

FieldChange PeopleCode associated with a descriptor can invoke a pop-up, change the display characteristics of the chart, and perform other processing logic.

Drop-down list box

You can configure a descriptor as a button associated with a drop-down list box. A drop-down list box can be linkable or read-only. If the drop-down list box is linkable, PeopleCode related to the descriptor executes when a user clicks a list item.

Header

Information that appears at the top of a pop-up.

Level

An organization chart is made up of boxes, representing nodes, at different levels. The position of a node in a chart is determined by its parent node (PTPARENT_CHART_ND) and display order (PTND_DISPLAY_ORDER).

Main chart

The primary chart in an organization chart showing individual entities, such as employees, in boxes related to one another hierarchically. A user can invoke PeopleCode that displays a pop-up node by clicking a link in a box, or node, of the main chart or by clicking a link in a pop-up node.

Node

A representation of a single entity, an individual instance of data, in an organization chart. A node is represented as a box with vertical lines connecting it to its parent node and to its child nodes, if any.

Node record

A derived/work record that contains the properties and data values for each node on the main chart.

The node record is created using a clone of the PTORGNODE_SBR subrecord.

Parent node

A node that has one or more subordinate nodes, or child nodes, one level below it. Each node can be a parent for other nodes.

Pop-up

A new window that displays information specifically related to a node on the main chart or another pop-up.

A pop-up can be invoked from a link on a main chart node or from a link on a pop-up node. FieldChange PeopleCode controls the appearance and content of a pop-up.

Pop-up node

A single instance of data on a pop-up. A pop-up can have one or more nodes, all related to one node of the main chart or one node of another pop-up.

Pop-up node record

A derived/work record that contains the properties and data values for each pop-up node on the main chart.

The node record is created using a clone of the PTORGPOPUPNODE_SBR subrecord.

Click to jump to top of pageClick to jump to parent topicUsing Organization Charts in PeopleSoft Pure Internet Architecture

A PeopleSoft organization chart consists of two parts: the main hierarchical chart and pop-ups that enable the user to access additional related data for each node.

An organization chart can be oriented vertically or horizontally.

The following example shows a vertical organization chart:

The following example shows a horizontally oriented organization chart with a pop-up:

The underlying chart is the main organization chart. The chart overlaying the nodes on the right is a pop-up chart.

Main Chart

The main chart can have multiple levels. Each level consists of one or more nodes. Each node represents an individual entity, such as an employee, in the organization. A node has one parent node (except the top-level node, which does not have a parent node) and zero, one, or more child nodes. Each node in the main chart has up to seven descriptors and each descriptor can be configured as a link or as a button associated with a drop-down list box. Application developers can associate FieldChange PeopleCode with each descriptor link or button associated with a linkable drop-down list box.

Internet Explorer 8 Considerations

In Microsoft Internet Explorer 8, organization charts may not display correctly when the browser Document mode is set to Standards mode. Only the Quirks mode is supported for PeopleSoft charts.

See See the TroubleShooting Browser Limitations document on Oracle's MyOracleSupport website.

Pop-up

A pop-up displays a pop-up node with information specifically related to the node from which it was invoked. A connector line visually links the pop-up chart to the predecessor node, the node in the chart from which the pop-up was invoked.

If the pop-up contains more nodes than can be displayed (that is, if MaxPopupDisplayNode is set to a number that is less than the total number of nodes) then a scroll bar appears in the pop-up. In some circumstances when a pop-up has a scroll bar and has more than one level, when a user clicks a link on a level other than the top level the new pop-up may not appear in the display area. If this occurs, the user can scroll down using the scroll bar in the initial pop-up to view the new pop-up node.

Note. The amount of time it takes for a pop-up to appear is proportional to the number of nodes in the pop-up. A pop-up with hundreds of nodes may take a long time to appear. An hourglass appears to let the use know the system is working to retrieve the nodes.

A pop-up is invoked through PeopleCode associated with the FieldChange event for a descriptor link on a main chart node or another pop-up node.

A pop-up consists of a header and one or more nodes with each node having up to eight descriptors. Each descriptor can be configured as a link.

The user can drag-and-drop a pop-up node to reposition it but the new position will not be retained after any action that requires a server trip that reloads the chart.

Click to jump to top of pageClick to jump to parent topicCreating Organization Charts Using the OrgChart Class

You can populate the organization node information using rowsets linked to existing record data, or you can populate the rowset from PeopleSoft trees using the Tree class APIs.

When you add an organization chart to a page in PeopleSoft Application Designer, you use the chart properties to associate the chart control with a chart record field. You will use this field name to identify the chart in PeopleCode.

You will need to create two records that will be the organization chart node records. The org node record holds the values for the properties and data for each of the nodes of the main chart. The pop-up node record holds the values for the properties and data for each of the pop-up nodes.

The organization chart node records must be in the component buffer at runtime. This means that you will have to place them on a page at level one in the component. You can hide them.

The maximum number of nodes you can create is limited according to browser, as shown in the following table:

Browser

Maximum Nodes

Microsoft Internet Explorer

250

Mozilla Firefox

1000

Apple Safari

600

The records can have any name, but they must include clones of the PeopleTools-delivered subrecords PTORGNODE_SBR and PTORGPOPUPNODE_SBR. Since the subrecords will carry the FieldChange PeopleCode for the chart, in most cases you should create unique subrecords for each chart.

Your PeopleCode will create and populate two rowsets . These must be component rowsets, linked to the node records of the chart, not standalone rowsets. The org node rowset has one row for each node in the organization chart, and the pop-up node rowset has one row for each pop-up node.

You place FieldChange PeopleCode on the fields of the node records to invoke pop-up charts, update displayed data, process application logic, and refresh the chart.

Using Images with Organization Charts

If your organization chart uses images, such as photographs, then the scroll area or grid with the fields that contain the images must have unlimited occurs count enabled. That is, the Unlimited Occurs Count check box must be selected on any scroll area or grid that includes a record with the fields from PTORGNODE_SBR or PTORGPOPUPNODE_SBR, but only when images are used.

Using Breadcrumbs with Organization Charts

You can configure an organization chart to display breadcrumbs. Typically, breadcrumbs display the names of people in an organization hierarchy. The following example shows an organization chart with breadcrumbs:

An organization chart can have only one set of breadcrumbs. The breadcrumbs appear horizontally at the top of an organization chart, above the chart legend if the legend is set. The breadcrumbs string wraps automatically if it is wider than the organization chart. If a breadcrumb contains a space, the breadcrumb string may wrap at the space, causing the breadcrumb to appear on two lines.

Style classes control the formatting of breadcrumbs. The default style classes are PT_ORGCHART_BRDCRM and PT_ORGCHART_UNLINK_BRDCRM. You can specify your own style classes using the CrumbDescrStyle and UnlinkCrumbDescrStyle properties.

You can specify an image to separate breadcrumb entries. If an image is not specified, the breadcrumbs are separated by three spaces. Each breadcrumb entry can be configured to be linkable. This configuration is similar to linkable text on organization chart nodes.

To implement breadcrumbs in an organization chart, you:

At runtime, your PeopleCode will add rows to the work record that holds the information for each breadcrumb (person).

Each breadcrumb in a chart is defined by a row in the record.

See Organization Chart Subrecord Definitions, CrumbDescrStyle.

Breadcrumb Methods and Properties

The following OrgChart class methods and properties control the appearance of breadcrumbs:

Using Drop-Down List Boxes

You can configure an organization chart to include buttons associated with drop-down list boxes for any of the node descriptors, enabling you to present related tasks for a node.

A drop-down list box can be linkable or read-only. If the drop-down list box is linkable, field change PeopleCode associated with the descriptor field, PTNODE_DESCRn, executes when a user clicks on a list item. If the drop-down list box is read-only, field change PeopleCode does not execute.

The width of a drop-down list box is the width of the widest list item that the box contains.

The height of the list item box is defined dynamically. An up-and-down arrow vertical scroll appears when the number of list items is greater than the value specified for the MaxDropdownDisplayItem property. The default value is 7.

A scroll appears if the list extends beyond the visible chart area.

To implement drop-down list boxes:

Use the DropDownBoxStyle property to specify the style to specify the button position in the node.

Click to jump to top of pageClick to jump to parent topicSpecifying Scroll Type

If an organization chart is larger than the viewable area, the user needs to scroll to view other areas of the chart. You can specify whether the organization chart will use scroll bars or alternative scrolling.

If you specify alternative scrolling, a scroll navigator and a hand cursor appear instead of vertical and horizontal scroll bars.

The arrows on the scroll navigator enable the user to quickly position the right, left, top, or bottom of the chart in the viewable area.

If the user scrolls the chart, the center button of the scroll navigator returns the chart to its initial display position. If the user changes focus by selecting a different node, the chart centers on that node. The center button then returns the chart to display centered on the focus node.

Note. If the breadcrumbs and chart legend are so large that there is not sufficient room to display the scroll navigator in the upper left portion of the chart, it will appear in the lower left corner.

The hand cursor enables the user to grab the background of the chart and move it within the viewable area.

Note. When using the hand cursor to scroll, you must position the hand cursor in the chart area outside the chart nodes and popup nodes. Scrolling does not work if the hand cursor is positioned within a chart node or pop-up node.

Use the ChartScrollType property to specify which type of scrolling to use. The default is scroll bars.

Click to jump to top of pageClick to jump to parent topicOrganization Chart Actions and Events

An organization chart can execute FieldEdit or FieldChange PeopleCode in response to these user actions:

Selecting Expand/Collapse Icons

When the user clicks an expand/collapse icon, the system toggles the EXPANDED_FLAG field value from “Y” to “N” or from “N” to “Y” and changes the icon on the node to collapsed or expanded, correspondingly. This action triggers field change processing (FieldEdit and FieldChange events) on EXPANDED_FLAG. Typically, FieldChange PeopleCode checks the EXPANDED_FLAG and PARENT_FLAG of the node and performs these actions:

Note. If your PeopleCode doesn’t populate the CollapsedImage and ExpandedImage properties of the organization chart, then no expand/collapse icon appears on any nodes in the chart, and the expand/collapse action is disabled for the chart.

Selecting a Descriptor Link or Linkable Drop-Down List Item

When the user clicks a descriptor link or linkable drop-down list item, field change processing is triggered on the PTNODE_DESCRn field in the node record.

For instance, suppose descriptor 2 is linked to a pop-up chart. When the user clicks the descriptor 2 link, FieldChange PeopleCode on the PTNODE_DESCR2 field in the node record performs the following actions:

  1. Sets the node’sPTPOPUPEXPAND_FLAG ="Y".

  2. Sets the node’s PTPOPUPHDRMAINDESC.

  3. Sets the node’s PTPOPUPHDRMAINICON.

  4. If the node’s PTHASPOPUP_FLAG ="X", then populates the pop-up node rowset and sets PTHASPOPUP_FLAG ="Y" to indicate that the node’s descriptor was clicked for the first time.

  5. Refresh the chart with the pop-up displayed.

Closing a Pop-up Node

When the user closes a pop-up node it triggers field change processing on the PTPOPUPEXPAND_FLAG field.

FieldChange PeopleCode on the PTPOPUPEXPAND_FLAG field would need to restore any changes that were made to the originating node's display characteristics and reset the node’s PTPOPUPEXPAND_FLAG ="N" .

Selecting a Breadcrumb

When a user clicks on a linkable breadcrumb, any FieldEdit and FieldChange PeopleCode in the PTORGCRMBID field executes. Typically PeopleCode is used to redraw the organization giving focus to the node that was clicked.

Clicking on a Photograph

When a user clicks on a node image, field change PeopleCode on the PTNDMAINICON_IMAGE field executes.

Clicking on a Node

When a user clicks on the body of a node -- not on a link, linkable drop-down list, or image -- field change PeopleCode on the PTCHART_NODE field executes.

Click to jump to top of pageClick to jump to parent topicOrganization Chart Subrecord Definitions

This table describes the fields in PTORGNODE_SBR:

Field

Description

PTCHART_NODE

Specifies the node name. PTCHART_NODE and PTPARENT_CHART_ND are key fields of the PTORGNODE record.

PTPARENT_CHART_ND

Specifies the parent of the current chart node.

If a node does not have a parent node defined, then the node is placed on the first level.

PTND_DISPLAY_ORDER

Specifies the display order of the sibling nodes for the same parent node.

Nodes display left to right according to display order.

By default, the nodes are ordered as they appear in the rowset.

PTCONNECTLINESTYLE

Specifies the style class name for connection line style. The default style class is PT_ORGCHART_CONNECT1.

PTNDMAINICON_IMAGE

Specifies the main icon image name for the node.

PTNODESTYLENAME

Indicates the style class name for the node to control node background color, border, style, and so on.

The default style class is PT_ORGNODE.

PTFOCUS_FLAG

Indicates a focused node (that is, the node that has focus).

Y – Focused node.

N – Not a focused node.

If more than one node is set to focused, only the first focused node in the rowset will be recognized as the focused node.

The default is “N”.

PARENT_FLAG

Indicates whether a node is a parent.

Y – The node is a parent and its direct children are already loaded into the rowset.

X – The node is a parent and its direct children are not loaded in the rowset (that is, they will be loaded on demand).

N – The node is not a parent.

The default value is “N”.

EXPANDED_FLAG

Indicates whether the node is expanded or collapsed.

Y – The chart shows the node expanded with the expanded image icon and its immediate children displayed.

N – The chart shows the node collapsed with the collapsed image icon.

DISPLAYED_FLAG

Indicates whether the node displays in the chart.

Y – The node displays if the parent node's EXPANDED_FLAG ="Y" (the parent node is not collapsed).

N – This node and its child nodes do not display in the chart's display area.

The default is “Y”.

PTHASPOPUP_FLAG

Indicates whether the node has a pop-up.

Y – This node has a link that invokes a pop-up and the data for the pop-up is already loaded into the pop-up node rowset.

X – This node has a link that invokes a pop-up and the data for the pop-up is not loaded in the rowset. The data will be loaded on demand.

N – This node does not have a link to invoke a pop-up chart. The default value is “N”.

PTPOPUPEXPAND_FLAG

Indicates whether a node’s pop-up nodes display.

Y – Pop-up nodes display.

N – No pop-up nodes display.

If the user clicks the close icon in the pop-up node, the FieldChange event for PTPOPUPEXPAND_FLAG executes. The application sets the value of PTPOPUPEXPAND_FLAG to “N” when the pop-up node is closed.

PTNODE_DESCRn

Specifies the descriptor n of the node, where n is an integer from 1 to 7; for example, PTNODE_DESCR2. Maximum length is 50 characters.

PTNDDESCnLINKABLE

Specifies whether the descriptor n is linkable, a button with a linkable drop-down list box, or a button with a read-only drop down list box, where n is an integer from 1 to 8; for example, PTNDDESC2LINKABLE.

Y – Linkable

N – Not linkable

D – Linkable drop down list box

R – Read-only down list box

The default value is “N”.

Note. If PTDESCRn_ICON_IMG is set to a valid image and PTNDDESCnLINKABLE is set to “D” or “R”, drop down list box, the image is not displayed.

PTDESCRn_ICON_IMG

Specifies the name of the image associated with descriptor n, where n is an integer from 1 to 7; for example, PTDESCR2_ICON_IMG.

Note. If PTDESCRn_ICON_IMG is set to a valid image and PTNDDESCnLINKABLE is set to “D” or “R”, drop down list box, the image is not displayed.

PTDESCRn_ICON_POS

Indicates the position of the icon relative to descriptor n, where n is an integer from 1 to 7; for example, PTDESCR2_ICON_POS.

L – To the left of the description.

R – To the right of the description.

The default value is based on user language. For instance, “L” for English and “R” for Hebrew.

PTADJUSTFORNULLS

Indicate whether to collapse empty attributes to conserve vertical space within the nodes.

Y – Collapse.

N – Do not collapse.

The default value is “N”.

PTPOPUPHDRMAINDESC

Specifies the main descriptor of the pop-up chart header for this node

PTPOPUPHDRMAINICON

Specifies the name of the image to place on the top left of the pop-up chart header.

PTORGCHRTIMG

Specifies the node image.

The maximum image size depends on your database platform.

Note. If this field is placed on a grid and the column is hidden (Visible = False), the node images do not appear on the chart.

PSIMAGEVER

A unique number that is assigned to each image. This is a system-maintained value.

PTDESCR_UNDER_IMG

Determines whether descriptors appear to the side of the image or below it.

Specify an integer from 1 to 7. The corresponding descriptor and all following descriptors appear below the image. All descriptors prior to the one specified appear to the side of the image.

If no value is specified, or any value other than 1-7, the descriptors all appear to the side. If no image is displayed, this field is ignored.

This table describes the fields in PTORGPOPUP_SBR.

Field

Description

PTCHART_NODE

Specifies the name of the node that invoked this pop-up chart.

PTCHART_NODE and PT_POP_UP_ID are keys for PTORGPOPUP_SBR.

PT_POP_UP_ID

The unique id for the pop-up .

PTCHART_NODE and PT_POP_UP_ID are keys for PTORGPOPUP_SBR.

PTPREDECESSOR_NODE

Specifies the name of the predecessor node to the current chart node. The predecessor node is the node that invoked this node.

Your application PeopleCode must set this value when the link is clicked on the predecessor node.

PTND_DISPLAY_ORDER

Sets the display order of the nodes within the same pop-up.

By default the nodes are ordered as they appear in the rowset.

PTNDMAINICON_IMAGE

Specifies the main icon image name for the node.

PTNODESTYLENAME

Specifies the style class name for the node to control node background color, border, style, and so on.

If no style class name is specified the PeopleTools default style class is used.

PT_POPUP_PARENT_ID

Set to the ID of the parent pop-up chart to which the PT_POP_UP_ID is attached. If the chart ID PT_POP_UP_ID is connected from the organization node, then its corresponding PT_POPUP_PARENT_ID value is NULL.

PTHASPOPUP_FLAG

Indicates whether the node has a pop-up.

Y – This node has a link that invokes a pop-up and the data for the pop-up is already loaded into the pop-up node rowset.

X – This node has a link that invokes a pop-up and the data for the pop-up is not loaded in the rowset. The data will be loaded on demand.

N – This node does not have a link to invoke a pop-up chart. The default value is “N”.

PTPOPUPEXPAND_FLAG

Indicates whether a node’s pop-up nodes display.

Y – Pop-up nodes display.

N – No pop-up nodes display.

If the user clicks the close icon in the pop-up node, the FieldChange event for PTPOPUPEXPAND_FLAG executes. The application sets the value of PTPOPUPEXPAND_FLAG to “N” when the pop-up node is closed.

DISPLAYED_FLAG

Indicates whether the node will appear in the pop-up chart.

Y = The node appears in the pop-up chart.

N = The node never appears in the pop-up chart, including its pop-up nodes.

Default is “Y”.

PTNODE_DESCRn

Specifies the descriptor n of the node, where n is an integer from 1 to 8; for example, PTNODE_DESCR2. Maximum length is 50 characters.

PTNDDESCnLINKABLE

Specifies whether the descriptor n is linkable, where n is an integer from 1 to 8; for example, PTNDDESC2LINKABLE.

Y – Linkable

N – Not linkable

PTDESCRn_ICON_IMG

Specifies the name of the image associated with descriptor n, where n is an integer from 1 to 8; for example, PTDESCR2_ICON_IMG.

PTDESCRn_ICON_POS

Indicates the position of the icon relative to descriptor n, where n is an integer from 1 to 8; for example, PTDESCR2_ICON_POS.

L – To the left of the description.

R – To the right of the description.

The default value is based on user language. For instance, “L” for English and “R” for Hebrew.

PTADJUSTFORNULLS

Indicates whether to collapse empty attributes to conserve vertical space within the nodes.

Y – Collapse

N – Do not collapse

PTPOPUPHDRMAINDESC

Specifies the main descriptor of the pop-up chart header for this node.

To force a line break in the header add a <br/> html tag.

Example:

'PLAN ID 23<BR/> EFF DATE 1/1/09'

Note. </br> does not produce a line break. The html tag must be <br/>.

PTPOPUPHDRMAINICON

Specifies the name of the image to place on the top left of the pop-up chart header.

This table describes the fields in PTORGBOXFLD_SBR:

Field

Description

PTDESCRn_DROPDOWN

The drop down list ID for descriptor n, where n is an integer from 1 to 7; for example, PTDESCR2_DROPDOWN.

PTDESn_SLCT_ITM_ID

The selected list Item ID in the drop-down box for descriptor n, where n is an integer from 1 to 7; for example, PTDES2_SLCT_ITM_ID.

The system sets this field to the value of the list item ID when the user clicks on a list item in the drop-down list box for descriptor n. You can add PeopleCode to the PTNODE_DESCRn field that performs business logic using the value in this field.

This table describes the fields in PTORGBOXLIST_SBR:

Field

Description

PTDESCR_DRPDWN_ID

Specifies the node description drop-down list box ID.

PTDESCR_DRPDWN_ID is a key field.

PTORGDRPLSTITM_ID

The drop down list item ID for the specified drop down list.

PTORGDRPLSTITM_ID is a key field.

PTND_DISPLAY_ORDER

Set the display order of the list item within the same dropdown box.

By default, the list will display in the order the list items appear in the rowset.

PTNODELISTDESCR

The text that will appear for the drop down list item. The maximum length is 60 characters.

PTORGLISTDESCSTYLE

Specify the style class for the list item. The default is PT_ACTION_LIST_ITEM.

This table describes the fields in PTORGCRMB_SBR:

Field

Description

PTORGCRMBID

Assigns the breadcrumb ID.

PTORGCRMBID is a key field.

PTPARENT_ORGCRMBID

Specifies the breadcrumb ID of Parent node.

Only one row, which will be the first breadcrumb, can have this field blank or there will be a runtime error.

PTORGCRMBDESCR

Sets the breadcrumb description. In an organization chart this is generally a name.

DISPLAYED_FLAG

The displayed flag,

Y = Displayed.

N = Not displayed.

The default is “N”.

PTORGCRMBLINKABLE

The linkable flag.

Y = Linkable

N = Not linkable

The default is “Y”.

Click to jump to top of pageClick to jump to parent topicMinimum Methods

At a minimum, these methods are needed to create an organization chart:

These methods are required if your organization chart uses pop-ups:

These methods are required if your organization chart uses breadcrumbs:

These methods are required if your organization chart uses drop-down list boxes:

Click to jump to top of pageClick to jump to parent topicData Type of an OrgChart Object

Chart objects are declared using the Chart data type. For example,

Local OrgChart &MyOrgChart;

Click to jump to top of pageClick to jump to parent topicScope of an OrgChart Object

A chart object can be instantiated only from PeopleCode.

You can use this object only in PeopleCode programs that are associated with an online process, not in an Application Engine program, a message notification, a Component Interface, and so on.

Click to jump to parent topicUsing the RatingBoxChart Class

A rating box chart is an interactive chart that displays nodes on a two-dimensional grid. A user can move the nodes from one box to another on the grid. When the user moves a node the underlying data updates automatically.

The rating box chart in this example displays ratings on the dimensions of potential and performance:

This section provides an overview of rating box chart terminology and discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding Rating Box Chart Terms

The following is a list of terms that apply specifically to rating box charts.

Box

A rating box chart is an array of boxes arranged in a grid along the X and Y axes. Each box represents a pair of ratings, one for the X value and one for the Y value.

Description

A text string that is associated with a node. The node description optionally displays with the node icon.

Icon

An image associated with a node that displays in a box on the rating box chart.

Node

A single data point on a rating box chart. A node represents an individual entity, such as an employee, customer, or product. A user can drag and drop a node to other boxes in the rating box chart grid.

Node Record

A record that contains the properties and data values for each node on the rating box chart. The node record must include a copy of the subrecord PTRATINGBIX_SBR.

Rating

A text string that is assigned to each box in the rating chart. Each box has an X rating, based on its position on the horizontal axis, and a Y rating, based on its position on the vertical axis.

Title

There are three titles: Main title, X-Axis title, and Y-Axis title. A title is text that identifies that portion of the chart.

Click to jump to top of pageClick to jump to parent topicUsing Rating Box Charts in PeopleSoft Pure Internet Architecture

A rating box chart displays nodes on a chart that is divided into two or more boxes arrayed in a grid.

An application can correlate nodes, represented by icons, with various entities, such as employees, customers, or products, and various attribute pairs, such as potential/performance, cost/benefit, or opportunity/risk.

A user interacts with the rating box by dragging nodes to different boxes. When a node is moved, its underlying X (horizontal) and Y (vertical) values are updated. A user can also interact with the rating box by changing the node X/Y values in the grid that contains the rating box values if the application makes the grid visible and editable.

If a box contains more nodes than the number set in the RatingBoxChart property BoxMaxDisplayItems, the user can click a link at the bottom of the box to launch a pop-up that contains all the nodes. The box border changes color to indicate that the box has a pop-up open. A vertical scrollbar enables the user to scroll through all the nodes in the list.

The View all pop-up automatically closes if the user moves a node to another quadrant.

Using PeopleCode, you can associate each node with an image, or icon, and a description. You can configure a rating box to display nodes with icons and descriptions or with only icons.

See Also

BoxMaxDisplayItems

Click to jump to top of pageClick to jump to parent topicCreating Rating Box Charts Using the RatingBoxChart Class

When you add a rating box chart to a page in PeopleSoft Application Designer, you use the chart properties to associate the chart control with a record field. You will use this field name to identify the chart in PeopleCode.

You will need to create a record that will be the rating box chart node record. The record can be a standard database record or a derived/work record. The node record holds the values for the properties and data for each of the rating box chart nodes.

The record can have any name, but it must include a clone of the PeopleTools-delivered subrecord PTRATINGBOX_SBR. Since the subrecord will carry the FieldChange PeopleCode for the chart, in most cases you should create a unique subrecord for each chart. The node record must be placed on a page at level one on the component so that its PeopleCode will be loaded into the component buffer. It can be hidden.

In your chart PeopleCode, typically in the Activate event, you will create and populate a rowset linked to the chart’s node record. This must be a component rowset, linked to the chart’s node record, not a standalone rowset. The rowset has one row for each node in the chart.

Actions and Events

When user drags the node from one box to another, PeopleSoft Charting updates the values for the node’s PTXAXISRATINGS and PTYAXISRATINGS values, changing the box’s X and Y values to the new values. This change invokes field change processing on the PTXAXISRATINGS and PTYAXISRATINGS fields on the rating box node record. Typically, FieldChange PeopleCode performs business logic and refreshes the chart display.

Text Orientation

The orientation of the main title in a rating box chart is always horizontal.

The orientation of the X-axis title and X-axis labels is always horizontal.

The orientation of the Y-axis title and Y-axis labels is always vertical.

Click to jump to top of pageClick to jump to parent topicRating Box Chart Subrecord Definition

These are the fields in PTRATINGBOX_SBR:

Field

Description

PTCHART_NODE

Specifies the node name. This is the key to the record.

PTND_DISPLAY_ORDER

Specifies the display order of the nodes within the chart. By default nodes will display in the same order as in the rowset.

You must provide a unique value for display order for each node in the rating box rowset so that the nodes will display in the correct order in the rating box. A runtime error message is thrown when the display order is not unique for each node in the rating box rowset.

PTNODE_DESCR1

Specifies the main description for the node.

PTNODEDESCRSTYLE

Specifies the style class that defines the description’s text font, type, color, size, and so on.

PTNDDESC1LINKABLE

Reserved for future use.

PTDESCR1_ICON_IMG

Specifies the image name for the main description.

PTDESCR1_ICON_POS

Indicates where to place the icon relative to the description.

L – Left of the description

R – Right of the description

PTXAXISRATINGS

Specifies the X-axis rating for the current node.

PTYAXISRATINGS

Specifies the Y-axis rating for the current node.

DISPLAYED_FLAG

Indicates whether the node will display in the chart area.

Y – The node will display in the chart area.

N – The node will not display in the chart area.

The default value is “Y”.

Click to jump to top of pageClick to jump to parent topicMinimum Methods

At a minimum these methods are needed to create a rating box chart.

Click to jump to top of pageClick to jump to parent topicMinimum Properties

At a minimum, these properties are needed to create a rating box chart.

These properties are required if the chart includes a view all pop-up:

Click to jump to top of pageClick to jump to parent topicData Type of a RatingBoxChart Object

Chart objects are declared using the Chart data type. For example,

Local RatingBoxChart &RatingBoxChart;

Click to jump to top of pageClick to jump to parent topicScope of a RatingBoxChart Object

A chart object can be instantiated only from PeopleCode.

You can use this object only in PeopleCode programs that are associated with an online process, not in an Application Engine program, a message notification, a Component Interface, and so on.

Click to jump to parent topicCharting Classes Reference

The Charting Classes Reference contains these topics:

Click to jump to parent topicCharting Classes Built-in Functions

CreateObject

GetChart

GetChartURL

GetGanttChart

GetOrgChart

GetRatingBoxChart

Click to jump to parent topicChart Class Methods

These methods are used by the Chart class. The methods are listed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicRefresh

Syntax

Refresh()

Description

Note. This method has been deprecated and remains for backward compatibility only. Use the SetData method or SetOLData method instead.

If you make a change to the underlying data of a chart, call the SetData method again to update the chart.

You don’t need to refresh after setting a property or method of the chart itself, such as setting the starting point or changing colors. When a method or property is used, the chart is automatically refreshed.

Parameters

None.

Returns

None.

Example

&MyChart.Refresh();

See Also

SetData, SetOLData.

Click to jump to top of pageClick to jump to parent topicReset

Syntax

Reset()

Description

Use the Reset method to clear all existing chart settings and data.

Parameters

None.

Returns

None.

See Also

Chart class: Refresh method.

Click to jump to top of pageClick to jump to parent topicSetColorArray

Syntax

SetColorArray(&Array_of_Color)

Description

Use the SetColorArray method to set the colors for a series. You can specify only a one-dimensional array for the parameter. This method applies only to base chart data, not to the overlay data.

The type of array can be any of the following:

Use the SetColorArray method for line charts instead of SetDataColor because SetDataColor does not work with line charts. Individual line segments cannot be colored because there are fewer line segments than points. Use SetColorArray instead to color each complete line (series).

Parameters

&Array_of_Color

Specify an already instantiated array that contains the color values that you want for the series. You can specify either a constant or a number.

The following lists all the values you can use with the chart color methods. You can use either the numeric or constant value.

Numeric Value

Constant Value

Description

-1

%ChartColor_Series_Default

Default series color. When a data point is set to this, the default series color or the color that has been set by the user for that series is used instead. This value works only with the SetColorArray method.

0

%ChartColor_Black

Black

1

%ChartColor_Blue

Blue

2

%ChartColor_Cyan

Cyan

3

%ChartColor_DarkGray

DarkGray

4

%ChartColor_Gray

Gray

5

%ChartColor_Green

Green

6

%ChartColor_LightGray

LightGray

7

%ChartColor_Magenta

Magenta

8

%ChartColor_Orange

Orange

9

%ChartColor_Pink

Pink

10

%ChartColor_Red

Red

11

%ChartColor_White

White

12

%ChartColor_Yellow

Yellow

13

%ChartColor_Red_Orange

Red_Orange

14

%ChartColor_Yellow_Green

Yellow_Green

15

%ChartColor_Blue_Violet

Blue_Violet

16

%ChartColor_Purple

Purple

17

%ChartColor_Yellow_Orange

Yellow_Orange

Returns

None.

Example

The following example sets the four series in the chart:

&NumArray = CreateArray(1, 3, 6, 9); &oChart.SetColorArray(&NumArray);

See Also

Array Class.

Click to jump to top of pageClick to jump to parent topicSetData

Syntax

SetData({Record_Name | &Rowset})

Description

Use the SetData method to specify where the data from the chart is coming from.

You can use either a record name or an already instantiated, populated rowset. In general, specify a record when building a chart from page data and a rowset when building a chart from a standalone rowset.

If you make a change to the underlying data of a chart, call the SetData method again to update the chart.

Parameters

Record_Name

Specify the name of a record to be used to populate the chart with data.

&Rowset

Specify the name of an already instantiated rowset to populate the chart with data. This is generally a standalone rowset.

Returns

None.

Example

The following is the minimum code you need to create a PeopleSoft chart.

Local Chart &MyChart; &MyChart = GetChart(ABS_HIST.CHART); &MyChart.SetData(ABS_HIST); &MyChart.SetDataYAxis(ABS_HIST.Reason); &MyChart.SetDataXAxis(ABS_HIST.Duration);

The following example creates a chart using a standalone rowset.

Function IScript_GetChartURL() local object &MYCHART; local string &MYURL; local rowset &MYROWSET; &MYCHART = CreateObject("Chart"); &MYROWSET = CreateRowset(Record.ABS_HIST); &EmplID = %Emplid; &MYROWSET.Fill("Where EMPLID :=1", &EmplID); &MYCHART.SetData(&MYROWSET); &MYCHART.SetDataXAxis(ABS_HIST.ABSENCE_TYPE); &MYCHART.SetDataYAxis(ABS_HIST.DURATION_DAYS); &MYURL = %Response.GetChartURL(&MYCHART); /* use &MYURL in your application */ ... End-Function;

See Also

Chart class: SetDataXAxis method, SetDataYAxis method.

Click to jump to top of pageClick to jump to parent topicSetDataAnnotations

Syntax

SetDataAnnotations(Record_Name.Field_Name)

Description

Use the SetDataAnnotations method to specify an optional text label that can be associated with each point in the chart.

Parameters

Recordname.Fieldname

Specify the field name (and the record it's associated with) that contains the text for the optional label.

Returns

None.

See Also

SetOLDataAnnotations

Click to jump to top of pageClick to jump to parent topicSetDataColor

Syntax

SetDataColor(Record_Name.Field_Name)

Description

Use the SetDataColor method to specify a field that contains the color for each data point. Each field for each data point must contain either a number or a constant that specifies the color you want to use.

Use the SetColorArray method for line charts instead of SetDataColor because SetDataColor does not work with line charts. Individual line segments cannot be colored because fewer line segments exist than points. Use SetColorArray instead to color each complete line (series).

Note. This method has no effect when used with an overlay.

Parameters

Record_Name.Field_Name

Specify the name of the record, and the field on that record, that contains the colors for each data point. You can specify either a constant or a number.

See Chart class: SetColorArray method.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetDataGlyphScale

Syntax

SetDataGlyphScale(Record_Name.Field_Name)

Description

Use the SetDataGlyphScale method to specify a field that contains numerical data defining the size of each glyph for bubble charts (scatter charts). These values are mapped to a range of size values between a predefined minimum and maximum.

This method only affects scatter charts (%ChartType_2DScatter)

Parameters

Recordname.Fieldname

Specify the field (and the record associated with it) that contains numerical data used to define the size of each glyph.

Returns

None.

See Also

SetOLDataGlyphScale

Click to jump to top of pageClick to jump to parent topicSetDataHints

Syntax

SetDataHints(Record_Name.Field_Name)

Description

Use the SetDataHints method to specify the field that contains the text that displays as a data hint.

What displays for a data hint depends on the value specified for the data hints method, as well as the value specified for the series and the data method.

Series Data but No Data Hints

If you do not specify data hints, but you do specify both the data series and data methods, the hints appear as follows:

Value ​value for point x position of series ​series

Where:

The following example shows this type of data hints. The tooltips pop-up appears when the cursor hovers over any data value.

Data Hints, Data, and Series

If you specify data hints, then that value appears. In the following example, the data hints are set to the same value as the series is set, that is, the product:

Data and Series, but no Data Hints

If you do not specify SetDataHints and do not specify SetDataSeries, then the value of the Y axis and the value of the X axis appear in the data hint:

Parameters

Record_Name.Field_Name

Specify the name of the record, and the field on that record, that contains the data hints for the chart.

Returns

None.

Example

The following PeopleCode example:

&oChart.SetDataHints(QE_CHART_RECORD.QE_CHART_REGION);

Could produce data hints as follows:

See Also

Chart class: SetDataXAxis method, SetDataSeries method.

Click to jump to top of pageClick to jump to parent topicSetDataSeries

Syntax

SetDataSeries(Record_Name.Field_Name)

Description

Use the SetDataSeries method to specify the name of the field containing the series values. Every distinct value in this field is considered a unique series.

The series is plotted in the order given by the record.

By default, the legend is populated by the value of this field.

If this value is Null, the system assumes there is only one series to plot.

Parameters

Record_Name.Field_Name

Specify the name of the record, and the field on that record, that contains the series values for the chart.

Returns

None.

Example

&MYCHART.SetDataSeries(MYRECORD.MYSERIES);

See Also

Chart class: SetDataXAxis method, SetDataYAxis method.

Click to jump to top of pageClick to jump to parent topicSetDataURLs

Syntax

SetDataURLs(FieldName)

Description

Use the SetDataURLs method to specify a URL to be launched when a data point is clicked in the chart. The URL for each point must be given as a string, that is, enclosed in quotation marks. You can also specify recordname.fieldname. Use this method for charts created from a chart control or a standalone rowset.

You could use this method to launch a JavaScript that generates a pop-up menu.

Parameters

FieldName

Specify a field name to be used to populate the URL for each data point.

Returns

None.

Example

&MyChart.SetDataURLs(MyRecord.URL);

Click to jump to top of pageClick to jump to parent topicSetDataXAxis

Syntax

SetDataXAxis(Record_Name.Field_Name)

Description

Use the SetDataXAxis method to specify the groups along the X axis.

If this value is not set or Null, the Y values are plotted along the X axis in groups labeled by their order number.

The order of the data is plotted in the order of the data in the record.

By default, the labels along the X axis are populated by the value of this field.

Parameters

Record_Name.Field_Name

Specify the name of the record, and the field on that record, that contains the data for the X axis for the chart.

Returns

None.

Example

In the following example, the Y axis is set to a numeric amount, while the X axis is set to the region.

&cChart = GetChart(PB_CHART_DUMREC.PB_CHART_FIELD); &cChart.SetData(Record.PB_CHART_RECORD); &cChart.SetDataSeries(PB_CHART_RECORD.PB_CHART_PRODUCT); &cChart.SetDataXAxis(PB_CHART_RECORD.PB_CHART_REGION); &cChart.SetDataYAxis(PB_CHART_RECORD.PB_CHART_SALES);

See Also

Chart class: SetDataYAxis method, SetData method.

Click to jump to top of pageClick to jump to parent topicSetDataYAxis

Syntax

SetDataYAxis(Record_Name.Field_Name)

Description

Use the SetDataYAxis to specify the data to plot in the chart.

The Y axis is always considered the data axis.

The Y axis must always be numeric. If the greatest Y-axis value is less than 10, the Y-axis labels are given a decimal place. If the greatest Y-axis value is greater than or equal to 10, the Y-axis labels appear as integers.

Note. If you have specified negative numbers in the Y axis, then the X axis is drawn according to the XAxisCross property.

Parameters

Record_Name.Field_Name

Specify the name of the record, and the field on that record, that contains the data for the Y axis for the chart.

Returns

None.

Example

&oChart.SetDataYAxis(QE_CHART_RECORD.QE_CHART_SALES);

See Also

Chart class: SetDataXAxis method, SetData method.

Click to jump to top of pageClick to jump to parent topicSetLegend

Syntax

SetLegend(&Array_of_String)

Description

Use the SetLegend method to specify alternative legends. By default, the legends are populated from the record field specified with SetDataSeries.

This method is used to write both the overlay legend and the series legend. The labels are overwritten in the order of elements in the array, that is, the first element overwrites the first series, the second overwrites the second, and so on, with the last element in the array overwriting the overlay legend. There can be more than one series in an overlay.

If you do not specify an element for an array (that is, a blank or a null) then no legend is listed for that series.

Note. Default label text is not automatically translated. If you set your own labels, be sure to use translated text, such as message catalog entries.

Parameters

&Array_of_String

Specify an already instantiated array of string, containing the text that you want to use for the legend.

Returns

None.

Example

The following example displays a legend containing only the overlay.

&LegendArray = CreateArray("", "", "Revenue"); &MyChart.SetLegend(&LegendArray);

See Also

Chart class: SetDataSeries method.

Array Class

Click to jump to top of pageClick to jump to parent topicSetOLData

Syntax

SetOLData({Record_Name | &Rowset})

Description

Use the SetOLData method to specify where the data for the overlay is coming from.

If you make a change to the underlying data of a chart, call the SetOLData method again to update the chart.

There are no default values for the overlay data. You must specify the data.

You can specify two different Y-axis fields, but you must make certain that different data plotted against the same axis makes sense. For example, while plotting two currency amounts would work technically—plotting currency amounts against number of units sold and sharing the same axis— would not look correct.

Parameters

Record_Name

Specify the name of a record to be used to populate the overlay of the chart with data.

&Rowset

Specify the name of an already instantiated rowset to populate the overlay of the chart with data.

Returns

None.

See Also

Chart class: SetDataXAxis method, SetDataYAxis method, SetData method.

Click to jump to top of pageClick to jump to parent topicSetOLDataAnnotations

Syntax

SetOLDataAnnotation(Record_Name.Field_Name)

Description

Use the SetOLDataAnnotations method to specify an optional text label that can be associated with each point in the overlay of the chart.

Parameters

Recordname.Fieldname

Specify the field name (and the record it's associated with) that contains the text for the optional label.

Returns

None.

See Also

SetDataAnnotations

Click to jump to top of pageClick to jump to parent topicSetOLDataGlyphScale

Syntax

SetOLDataGlyphScale(Record_Name.Field_Name)

Description

Use the SetOLDataGlyphScale method to specify a field that contains numerical data defining the size of each glyph in the overlay chart. These values are mapped to a range of size values between a predefined minimum and maximum.

Parameters

Recordname.Fieldname

Specify the field (and the record associated with it) that contains numerical data used to define the size of each glyph.

Returns

None.

See Also

SetDataGlyphScale

Click to jump to top of pageClick to jump to parent topicSetOLDataSeries

Syntax

SetOLDataSeries(Record_Name.Field_Name)

Description

Use the SetOLDataSeries method to specify the name of the field containing the overlay series values. Every distinct value in this field is considered a unique series.

The series is plotted in the order given by the rows in the record.

If this value is Null, the system assumes there is only one series to plot.

Parameters

Record_Name.Field_Name

Specify the name of the record, and the field on that record, that contains the series values of the overlay for the chart.

Returns

None.

See Also

Chart class: SetDataSeries method.

Click to jump to top of pageClick to jump to parent topicSetOLDataXAxis

Syntax

SetOLDataXAxis(Record_Name.Field_Name)

Description

Use the SetOLDataXAxis method to specify the groups along the X axis if the axis is non-numeric for the overlay.

If the X axis is numeric, this method is used to give the position of the points along the axis. Only discrete values are supported for the X axis.

If this value is Null, the Y values are plotted along the X axis in groups labeled by their order number.

The order of the data is plotted in the order of rows in the record.

Parameters

Record_Name.Field_Name

Specify the name of the record, and the field on that record, that contains the data for the X axis for the overlay of the chart.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetOLDataYAxis

Syntax

SetOLDataYAxis(Record_Name.Field_Name)

Description

Use the SetOLDataYAxis to specify the data to plot for the overlay of the chart.

This value must always be numeric.

This method has no default value.

Parameters

Record_Name.Field_Name

Specify the name of the record, and the field on that record, that contains the data for the overlay of the chart.

Returns

None.

See Also

Chart class: SetDataXAxis method, SetDataYAxis method.

Click to jump to top of pageClick to jump to parent topicSetXAxisLabels

Syntax

SetXAxisLabels(&Array_of_Any)

Description

Use the SetXAxisLabels method to specify an array of labels for the X axis. By default, the labels are populated from the record field specified by SetDataXAxis. Labels specified with SetXAxisLabels overwrite the default labels.

Note. Default label text is not automatically translated. If you set your own labels, be sure to use translated text, such as message catalog entries.

Parameters

&Array_of_Any

Specify an already instantiated array of any that contain the labels that you want to use for the X Axis.

Returns

None.

See Also

Chart class: SetDataXAxis method.

Array Class

Tick Mark Considerations

Click to jump to top of pageClick to jump to parent topicSetYAxisLabels

Syntax

SetYAxisLabels(&Array_of_Any)

Description

Use the SetYAxisLabels method to specify an array of labels for the Y axis. Labels specified with SetYAxisLabels overwrite the default labels.

If the greatest Y-axis value is less than ten, the default Y-axis labels are given a decimal place. If the greatest Y-axis value is greater than or equal to ten, the default Y-axis labels are displayed as integers.

Note. Default label text is not automatically translated. If you set your own labels, be sure to use translated text, such as message catalog entries.

If you set the labels yourself, you may need to set the YAxisTicks and YAxisMax because you no longer have numbers that correlate to the data points.

Parameters

&Array_of_Any

Specify an already instantiated array of any that contain the labels that you want to use for the Y Axis.

Returns

None.

See Also

Chart class: SetDataXAxis method, YAxisTicks property, YAxisMax property.

Array Class

Tick Mark Considerations

Click to jump to parent topicChart Class Properties

These properties are used by the Chart class. The properties are described in alphabetic order.

Click to jump to top of pageClick to jump to parent topicDataStartRow

Description

This property sets or returns the row number (after any preprocessing) at which to start plotting. This is useful when you have many rows of data in a rowset, and you want to start at a particular row. This can also be useful for creating your own 'scrolling' effect, by specifying both the start row and how many rows to be displayed (by using the DataWidth property).

If this property is not set, then the value is 1.

This property is read-write.

See Also

Chart class: DataWidth property.

Click to jump to top of pageClick to jump to parent topicDataWidth

Description

This property returns or sets the number of rows to plot for a series. The starting point for the number of rows is set with the DataStartRow property. If the DataWidth property value is not set, then the width is from the DataStartRow to the last element in the rowset. If the property value is less than zero, then it will automatically be set to one.

This property is read-write.

Example

Suppose your rowset returned 400 rows. You wouldn't want all 400 to display in your chart. Instead, you'd pick a subset of those rows. The row to start with is set with DataStartRow, while how many rows to display is set with DataWidth.

The following code could be used with a push button connected with a chart. The push button enables the next set of data to appear with the chart.

You do not need to refresh after setting this property. When a method or property is used, the chart is automatically refreshed.

Local Chart &MyChart; &MyChart = GetChart(ChartRec.DisplayField); &Start = &MyChart.DataStartRow; /* display the next 20 rows of data */ &MyChart.DataStartRow = &Start + 20; &MyChart.DataWidth = 20;

See Also

Chart class: DataStartRow property.

Click to jump to top of pageClick to jump to parent topicGridLines

Description

Use this property to specify whether to show grid lines with the chart.

Note. This property is ignored unless you have set RevertToPre850 to True for the chart.

If you do not specify a value, both horizontal and vertical grid lines are shown.

This property controls only the display of grid lines. If you want to specify the style of the grid lines, use the GridLineType property.

The values are:

Numeric Value

Constant Value

Description

0

%ChartGrid_None

Don't show grid lines

1

%ChartGrid_Horizontal

Show horizontal grid lines (default)

2

%ChartGrid_Vertical

Show vertical grid lines

3

%ChartGrid_Both

Show both vertical and horizontal grid lines

This property is read-write.

See Also

GridLineType

Click to jump to top of pageClick to jump to parent topicGridLineType

Description

 

Use this property to specify the style of the grid lines when either or both vertical or horizontal grid lines are turned on.

Note. This property is ignored unless you have set RevertToPre850 to True for the chart.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

The default value is %ChartLine_Solid. The possible values are:

Value

Description

%ChartLine_Solid

Draw grid lines with solid lines.

%ChartLine_Dash

Draw grid lines with lines composed of dashes.

%ChartLine_Dot

Draw grid lines with lines composed of dots.

%ChartLine_DashedDot

Draw grid lines with lines composed of both dashes and dots.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicHasLegend

Description

Use this property to specify if a legend is displayed with the chart. This property takes a Boolean value: True, if the legend is displayed with the chart, False otherwise.

The default value is False.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicHeight

Description

Use this property to specify the height of the chart. This property takes a numeric value. The unit of measurement is pixels.

Generally this property is used with charts created for iScripts, to specify the height of the image, before generating the image map. You can also use it to overwrite the height set in PeopleSoft Application Designer.

If you try to read this property before setting it, the value returned is zero.

Note. The Height and Width properties must be set to the same value to change the size of a 2D Scatter chart, that is, a chart with the Type property set to %ChartType_2DScatter.

This property is read-write.

See Also

Chart class: Height property.

Click to jump to top of pageClick to jump to parent topicImageMap

Description

This property returns the HTML client-side image map. The image map is what makes the chart interactive.

This property is read-only.

See Also

Creating a Chart Using an iScript.

Click to jump to top of pageClick to jump to parent topicIsDrillable

Description

Use this property to specify whether the end-user can click on the chart and trigger a PeopleCode program in the FieldChange event for that row.

By default, when the chart data comes from a record, a PeopleCode program in the FieldChange event for the Y-Data field of the clicked row is executed.

Note. The record that contains the PeopleCode must be in the component buffer at runtime.

See Creating a Chart Using the Chart Class.

This property takes a Boolean value: True if the end-user can click on the chart to initiate an action, False otherwise.

Note. Setting this property has no effect if the IsPlainImage property is set as True.

Note. When using a chart in an iScript, this property must be used in conjunction with the SetDataURLs method. The SetDataURLs method must point to a field that is populated with the URLs to be triggered for each data point in the chart.

The default value for this property is False.

This property is read-write.

See Also

IsPlainImage

Click to jump to top of pageClick to jump to parent topicIsPlainImage

Description

Use this property to specify whether the chart is built without any extra HTML, such as SRC or MAP tags.

If this property is specified as True, the end-user will not be able to click on the chart to trigger an event. In addition, the pop-up data hints will not appear when the end-user passes a mouse over the chart. However, you may see a performance improvement if your chart has an extremely complicated image map and you specify this property as True.

This property takes a Boolean value: True if the chart is built without extra HTML, False otherwise.

The default value of this property is False.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicIsTrueXY

Description

Use this property to enable a TrueXY, or numeric, axis. This causes the X-axis data to be loaded as continuous linear numeric data, rather than discrete data, as is used in bar charts for example.

This property is only applicable to scatter, line or histogram charts where the X axis can be numeric.

This property is read-write.

See Also

True XY Line Chart

Click to jump to top of pageClick to jump to parent topicIsYAxisInteger

Description

Specify whether the Y axis will display integers. Set IsYAxisInteger to True if the Y axis represents integer data, such as number of people or number of tasks.

IsYAxisInteger is not used with pie charts and percentage bar charts.

This property takes a Boolean value.

The default value of this property is False.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicLegendMaxEntries

Description

Use this property to specify the number of legend entries before a new column (or row) is created.

When the legend position is specified as left or right, the legend is drawn vertically so a new column is created when this property is exceeded.

When the legend position is specified as top or bottom, the legend is drawn horizontally and a new row is created when this property is exceeded.

The default value of this property is five.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicLegendPosition

Description

Use this property to specify where the legend should appear, in relationship to the chart. You can specify either a numeric or constant value for this property.

Note. ChartLegend_Separate generates a legend without a chart. The legend takes over the entire charting area. The legend appears in the center of the chart.

The values are:

Numeric Value

Constant Value

Description

0

%ChartLegend_Left

Display legend to the left of the chart.

1

%ChartLegend_Right

Display legend to the right of the chart.

2

%ChartLegend_Top

Display legend on top of the chart.

3

%ChartLegend_Bottom

Display legend below the chart.

4

%ChartLegend_Separate

Generate a legend without a chart.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicLegendStyle

Description

Use this property to specify the style of the legend. The values for this property are the style classes contained in the style sheet associated with the chart.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicLineType

Description

Use the LineType property to specify the style of series that are plotted as lines. This is for a regular series only. To specify the style of line for overlay data, use the OLLineType property.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

This property takes either a numeric or constant value. The values are:

Numeric Value

Constant Value

Description

1

%ChartLine_Solid

Draw series with a solid line.

2

%ChartLine_Dash

Draw series with a line composed of dashes.

3

%ChartLine_Dot

Draw series with a line composed of dots.

4

%ChartLine_DashedDot

Draw series with a line composed of both dashes and dots.

This property is read-write.

See Also

Chart class: OLLineType property.

Click to jump to top of pageClick to jump to parent topicMainTitle

Description

Use this property to specify the text for the main title of the chart.

This property takes a string value.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicMainTitleOrient

Description

Use this property to specify the orientation of the text for the main title.

The default value is horizontal.

You can specify either a number or a constant for this property. The values are:

Numeric Value

Constant Value

Description

0

%ChartText_Horizontal

Title text is displayed horizontally.

90

%ChartText_Vertical

Title text is displayed vertically.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicMainTitleStyle

Description

Use this property to specify the style of the main title. The values for this property are the style classes contained in the style sheet associated with the chart.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicOLLineType

Description

Use the OLLineType property to specify the style of an overlay line.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

This property takes either a numeric or constant value. The values are:

Numeric Value

Constant Value

Description

1

%ChartLine_Solid

Draw series with a solid line.

2

%ChartLine_Dash

Draw series with a line composed of dashes.

3

%ChartLine_Dot

Draw series with a line composed of dots.

4

%ChartLine_DashedDot

Draw series with a line composed of both dashes and dots.

This property is read-write.

See Also

Chart class: LineType property.

Click to jump to top of pageClick to jump to parent topicOLType

Description

Use this property to specify the style of the overlay line.

You can specify either a numeric or a constant value for this property. The values are:

Numeric Value

Constant Value

Description

4

%ChartType_2DLine

Overlay is drawn as a 2D line.

5

%ChartType_2DHistogram

Overlay is drawn as a 2D histogram.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicRevertToPre850

Description

PeopleTools Version 8.50 implements new chart style classes that bring a consistent look and feel to charts.

Use this property to specify whether the chart will revert to the pre-PeopleTools 8.50 chart style classes.

Warning! By default RevertToPre850 is set to False, which means that charts that were created prior to PeopleTools 8.50 will use the new 8.50 chart style classes.

Any custom Chart class properties that were set in PeopleCode for existing charts that use the new 8.50 chart style classes will be ignored if those properties are defined in the 8.50 chart style classes.

Oracle strongly recommends that you review existing charts to verify that they display correctly.

This property takes a Boolean value:

True

Do not use the PeopleTools 8.50 style classes for this chart so that the chart will maintain its original appearance.

False

Use the PeopleTools 8.50 style classes for this chart.

Any chart properties that are set in application PeopleCode may be overridden by the 8.50 style classes.

The default is False.

This property is read-write.

See Also

Chart class: OLLineType property.

Click to jump to top of pageClick to jump to parent topicRotationAngle

Description

Note. This property has been deprecated and remains for backward compatibility only. Use the XRotationAngle, YRotationAngle, and ZRotationAngle properties instead.

Use this property to specify the rotation angle of the chart. This property is valid only with 3D style charts, that is, charts that have Type set as %ChartType_3DBar, %ChartType_3DStackedBar, and so on.

Note. This property has no effect on the 3D pie chart.

You don’t need to refresh after setting this property. When a method or property is used, the chart is automatically refreshed.

This property takes a numeric value from 1 to 360.

This property does not take negative numbers.

The chart is rotated in a clockwise direction.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicShowCrossHair

Description

Use the ShowCrossHair property to specify whether the chart should be split into quadrants.

This property takes a boolean value. If you specify true, two lines are drawn, one from the middle of the X axis and one from the middle of the Y axis.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicStyle

Description

A style sheet is a definition, like a record or field definition, that you create in PeopleSoft Application Designer. It contains a collection of formatting styles, called classes, each of which can be applied to either the entire chart or to specific elements within a chart.

Use this property to specify the overall style of the chart by specifying a style class. The value must be a valid class within the style sheet specified for the chart.

Individual style properties (such as SetXAxisStyle, MainTitleStyle, and so on) can be used to override this value for individual elements of the chart.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

Click to jump to top of pageClick to jump to parent topicStyleSheet

Description

Use this property to associate a style sheet with a chart.

The PTSTYLEDEF style sheet is the default style sheet associated with a chart.

Both the Style property for the chart, and individual style properties (such as SetXAxisStyle, MainTitleStyle, and so on) can be used to override this value for individual elements of the chart.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

Click to jump to top of pageClick to jump to parent topicType

Description

Use this property to specify the type of chart that you want. You can specify either a numeric or constant value for this property. The valid values are:

Numeric Value

Constant Value

Description

0

%ChartType_2DBar

Two-dimensional bar chart

1

%ChartType_2DStackedBar

Two-dimensional stacked bar chart

2

%ChartType_2DPercentBar

Two-dimensional percent bar chart

3

%ChartType_2DHorizStackedBar

Two-dimensional stacked horizontal bar chart

4

%ChartType_2DLine

Two-dimensional line chart

5

%ChartType_2DHistogram

Two-dimensional histogram chart

6

%ChartType_2DPie

Two-dimensional pie chart

7

%ChartType_3DBar

Three-dimensional bar chart

8

%ChartType_3DStackedBar

Three-dimensional stacked bar chart

9

%ChartType_3DPie

Three-dimensional pie chart

10

%ChartType_2DHorizPercentBar

Two-dimensional horizontal percent chart

11

%ChartType_3DPercentBar

Three-dimensional percent bar char

13

%ChartType_2DHorizBar

Two-dimensional horizontal bar chart

14

%ChartType_Scatter

Scatter chart.

This property is read-write.

See Also

Chart Class Chart Types.

Click to jump to top of pageClick to jump to parent topicWidth

Description

Use this property to specify the width of the chart. This property takes a numeric value. The unit of measurement is pixels.

Generally this property is used with charts created for iScripts, to specify the width of the image, before generating the image map. You can also use it to overwrite the width set in PeopleSoft Application Designer.

If you try to read this property before setting it, the value returned is zero.

Note. The Height and Width properties must be set to the same value to change the size of a 2D Scatter chart, that is, a chart with the Type property set to %ChartType_2DScatter.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicXAxisCross

Description

Use this property to specify the appearance of the X-axis data when there are both negative and positive values.

You can specify either a numeric value or a constant for this property. Values are:

Numeric Value

Constant Value

Description

0

%ChartXAxisCross_Zero

The X axis extrudes from the zero point on the Y axis. X-axis labels are located below the X axis.

–1

%ChartXAxisCross_Bottom

The X axis extrudes from the Y minimum on the Y axis.

–2

%ChartXAxisCross_ZeroLineBttm

The X axis extrudes from the Y minimum on the Y axis, and a line is drawn from the zero point on the Y axis.

-3

%ChartXAxisCross_ZeroLblsBttm

The X axis extrudes from the zero point on the Y axis. X-axis labels are located at the bottom of the chart.

This property is read-write.

Example

The following code:

&MyChart.XAxisCross = %ChartXAxisCross_ZeroLineBttm;

produces a chart similar to this:

Click to jump to top of pageClick to jump to parent topicXAxisCrossPoint

Description

Use the XAxisCrossPoint property to specify the point at which the X axis intersects a numeric Y axis. The value is in the coordinate system of the Y-axis scale.

This property is read-write.

See Also

YAxisCrossPoint

Click to jump to top of pageClick to jump to parent topicXAxisLabelOrient

Description

Use this property to specify whether the X-axis label is displayed horizontally or vertically.

The default value is horizontal.

You can specify either a numeric value or a constant for this property. Values are:

Numeric Value

Constant Value

Description

0

%ChartText_Horizontal

The X-axis label is displayed horizontally.

90

%ChartText_Vertical

The X-axis label is displayed vertically

This property is read-write.

Click to jump to top of pageClick to jump to parent topicXAxisMax

Description

The maximum value of the X axis.

This property is only applicable to scatter, line or histogram charts where the X axis is numeric, that is, the IsTrueXY property has been set to true.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicXAxisMin

Description

The minimum value of the X axis.

This property is only applicable to scatter, line or histogram charts where the X axis is numeric, that is, the IsTrueXY property has been set to true.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicXAxisPrecision

Description

Use the XAxisPrecision property to control the number of decimal places displayed in the labels of a numeric X axis.

This property is only applicable to scatter, line or histogram charts where the X axis is numeric, that is, the IsTrueXY property has been set to true.

This property is read-write.

See Also

YAxisPrecision

Click to jump to top of pageClick to jump to parent topicXAxisScaleResolution

Description

Use the XAxisScaleResolution property to control the level of detail displayed on a numeric axis. Use this property to increase or reduce the number of major tick marks and labels on the X axis.

This property is only applicable to scatter, line, bubble, or histogram charts where the X axis is numeric, that is, the IsTrueXY property has been set to true.

The values are:

Numeric Value

Constant Value

Description

0

%ChartAxisResolution_Fine

Specify fine resolution for the chart, that is, increase the number of major ticks and labels on the X axis. The fine scale resolution uses extra tick marks to give a more detailed division of the axis. This means that there may not be a one-to-one relationship between the axis labels and the tick marks.

1

%ChartAxisResolution_Coarse

Specify coarse resolution for the chart, that is, reduce the number of major ticks and labels on the X axis. The coarse scale value maintains a one-to-one relationship between the axis labels and the tick marks.

This property is read-write.

See Also

YAxisScaleResolution

Click to jump to top of pageClick to jump to parent topicXAxisStyle

Description

Use this property to specify the style of the X axis. The values for this property are the style classes contained in the style sheet associated with the chart.

Note. Pie chart labels take their style from this property.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicXAxisTicks

Description

Use this property to specify the number of minor tick marks along the X axis. This property takes a numeric value. To control the major tick marks use the XAxisScaleResolution method.

This property is read-write.

See Also

XAxisScaleResolution

Tick Mark Considerations

Click to jump to top of pageClick to jump to parent topicXAxisTitle

Description

Use this property to specify the text for the X-axis title.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicXAxisTitleOrient

Description

Use this property to specify the orientation of the text for the X-axis title.

You can specify either a number or a constant for this property. The values are:

Numeric Value

Constant Value

Description

0

%ChartText_Horizontal

Title text is displayed horizontally.

90

%ChartText_Vertical

Title text is displayed vertically.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicXAxisTitleStyle

Description

Use this property to specify the style of the X-axis title. The values for this property are the style classes contained in the style sheet associated with the chart.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicXRotationAngle

Description

Use this property to specify the angle of rotation about the X axis in degrees.

This property is valid only with 3D-style charts, that is, charts that have the Type property set as %ChartType_3DBar, %ChartType_3DStackedBar, %ChartType_3DPercentBar, or %ChartType_3DPie.

You do not need to refresh after setting this property. When a method or property is used, the chart is automatically refreshed.

This property takes a string value from “0” to “360”.

The chart is rotated in a clockwise direction.

If a negative value is specified the chart is rotated counter-clockwise.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicYAxisCrossPoint

Description

Use the YAxisCrossPoint property to specify the point at which the Y axis intersects a numeric X axis. The value is in the coordinate system of the X-axis scale.

This property is only applicable to scatter, line or histogram charts where the X axis is numeric, that is, the IsTrueXY property has been set to true.

This property is read-write.

See Also

XAxisCrossPoint

Click to jump to top of pageClick to jump to parent topicYAxisLabelOrient

Description

Use this property to specify whether the Y-axis label is displayed horizontally or vertically.

The default value is horizontal.

You can specify either a numeric value or a constant for this property. Valid values are:

Numeric Value

Constant Value

Description

0

%ChartText_Horizontal

The Y-axis label is displayed horizontally.

90

%ChartText_Vertical

The Y-axis label is displayed vertically

This property is read-write.

Click to jump to top of pageClick to jump to parent topicYAxisMax

Description

Use this property to specify the maximum value of the Y (data) axis. This property takes a numeric value.

The maximum value sets the largest value that is displayed on the axis.

Note. If the YAxisMax and YAxisMin properties are not set, or are set to too narrow a range, ticks may not appear on the Y axis.

This property is only applicable to scatter, line, or histogram charts.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicYAxisMin

Description

Use this property to specify the minimum value of the Y axis. This property takes a numeric value.

The minimum value sets the point at which the chart plots in positive and negative directions.

The default minimum value is the default value of the Y axis.

Note. If the YAxisMax and YAxisMin properties are not set, or are set to too narrow a range, ticks may not appear on the Y axis.

This property is only applicable to scatter, line, or histogram charts.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicYAxisPrecision

Description

Use the YAxisPrecision property to control the number of decimal places displayed in the labels of a numeric Y axis.

This property is only applicable to scatter, line or histogram charts.

This property is read-write.

See Also

XAxisPrecision

Click to jump to top of pageClick to jump to parent topicYAxisScaleResolution

Description

Use the YAxisScaleResolution property to control the level of detail displayed on a numeric axis. Use this property to increase or reduce the number of major ticks and labels on the Y axis.

This property is only applicable to scatter, line, or histogram charts.

The values are:

Numeric Value

Constant Value

Description

0

%ChartAxisResolution_Fine

Specify fine resolution for the chart, that is, increase the number of major ticks and labels on the Y axis. The fine scale resolution uses extra tick marks to give a more detailed division of the axis. This means that there may not be a one-to-one relationship between the axis labels and the tick marks.

1

%ChartAxisResolution_Coarse

Specify coarse resolution for the chart, that is, reduce the number of major ticks and labels on the Y axis. The coarse scale value maintains a one-to-one relationship between the axis labels and the tick marks.

This property is read-write.

See Also

XAxisScaleResolution

Click to jump to top of pageClick to jump to parent topicYAxisStyle

Description

Use this property to specify the style of the Y axis. The values for this property are the style classes contained in the style sheet associated with the chart.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicYAxisTicks

Description

Use this property to specify the number of minor tick marks along the Y (data) axis. This property takes a numeric value. To control the major tick marks use the YAxisScaleResolution method.

This property is read-write.

See Also

YAxisScaleResolution

Tick Mark Considerations

Click to jump to top of pageClick to jump to parent topicYAxisTitle

Description

Use this property to specify text of the title for the Y axis.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicYAxisTitleOrient

Description

Use this property to specify the orientation of the text for the Y-axis title.

You can specify either a number or a constant for this property. The values are:

Numeric Value

Constant Value

Description

0

%ChartText_Horizontal

Title text is displayed horizontally.

90

%ChartText_Vertical

Title text is displayed vertically.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicYAxisTitleStyle

Description

Use this property to specify the style of the Y-axis title. The values for this property are the style classes contained in the style sheet associated with the chart.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicYRotationAngle

Description

Use this property to specify the angle of rotation about the Y axis in degrees.

This property is valid only with 3D-style charts, that is, charts that have the Type property set as %ChartType_3DBar, %ChartType_3DStackedBar, %ChartType_3DPercentBar, or %ChartType_3DPie.

You do not need to refresh after setting this property. When a method or property is used, the chart is automatically refreshed.

This property takes a string value from “0” to “360”.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicZRotationAngle

Description

Use this property to specify the angle of rotation about the Z axis in degrees.

This property is valid only with 3D-style charts, that is, charts that have the Type property set as %ChartType_3DBar, %ChartType_3DStackedBar, %ChartType_3DPercentBar, or %ChartType_3DPie.

You do not need to refresh after setting this property. When a method or property is used, the chart is automatically refreshed.

This property takes a string value from “0” to “360”.

This property is read-write.

Click to jump to parent topicGantt Class Methods

These methods are used by the Gantt class. The methods are described in alphabetic order.

Click to jump to top of pageClick to jump to parent topicRefresh

Syntax

Refresh()

Description

Use the Refresh method if the underlying data of the chart has changed, and you want to update the chart.

Note. This method has been deprecated and remains for backward compatibility only. Use the SetTaskAppData method or SetTaskData method instead.

You don’t need to refresh after setting a property or method of the chart itself, such as setting the starting point or changing colors. When a method or property is used, the chart is automatically refreshed.

Parameters

None.

Returns

None.

Example

&MyChart.Refresh();

See Also

SetTaskAppData, SetTaskData.

Click to jump to top of pageClick to jump to parent topicReset

Syntax

Reset()

Description

Use the Reset method to clear all existing chart settings and data.

Parameters

None.

Returns

None.

See Also

Chart class: Refresh method.

Click to jump to top of pageClick to jump to parent topicSetActualEndDate

Syntax

SetActualEndDate(RecordName.FieldName)

Description

Use the SetActualEndDate method to specify the field in the record that defines the actual end date. This is an optional method, and is used in conjunction with the SetPlannedEndDate method. If an actual end date is specified, then an actual start date must also be specified. When defined, the actual or baseline tasks are visually shown as a separate task bar and are layered beneath the planned task if the two overlap.

Note. The Gantt chart logs a warning to the file PSJChart.log for any task that has a bad date format in this method or the SetActualStartDate method, but it continues with its normal processing. For these tasks, the overlayed baseline information is not displayed in the chart section.

Parameters

RecordName.FieldName

Specify the field and its associated record that contains the value used to define the actual end date. This field must be of DateTime or Date type.

Returns

None.

See Also

SetActualStartDate, SetPlannedEndDate, SetPlannedStartDate.

Click to jump to top of pageClick to jump to parent topicSetActualStartDate

Syntax

SetActualStartDate(RecordName.FieldName)

Description

Use the SetActualStartDate method to specify the field in the record that defines the actual start date. This is an optional method, and is used in conjunction with the SetPlannedStartDate method. If an actual start date is specified, then an actual end date must also be specified. When defined, the actual or baseline tasks are visually shown as a separate task bar and are layered beneath the planned task if the two overlap.

Note. The Gantt chart logs a warning to the file PSJChart.log for any task that has a bad date format in this method and the SetActualEndDate method, but continues with its normal processing. For these tasks, the overlayed baseline information is displayed in the chart section.

Parameters

RecordName.FieldName

Specify the field and its associated record that contains the value used to define the actual start date. This field must be of DateTime or Date type.

Returns

None.

See Also

SetActualEndDate, SetPlannedEndDate, SetPlannedStartDate.

Click to jump to top of pageClick to jump to parent topicSetActualTaskBarColor

Syntax

SetActualTaskBarColor(RecordName.FieldName)

Description

Use the SetActualTaskBarColor method to specify the field in the record that defines the colors for either the actual task bar or the actual milestone glyph.

Parameters

RecordName.FieldName

Specify the field, and its associated record, that defines the task bar color. This field must be of type number, which means you can only use the numeric value for the color.

Returns

None.

See Also

SetPlannedTaskBarColor, TaskMilestoneGlyph.

Click to jump to top of pageClick to jump to parent topicSetChartArea

Syntax

SetChartArea(Percentage)

Description

Use the SetChartArea method to specify what percentage of the Gantt chart is allocated to displaying the chart section. By default, both the task and chart sections are allocated 50% of the available space provided by the Gantt chart.

Parameters

Percentage

Specify the percentage of the page space for a Gantt chart that is allocated for displaying the chart area. Oracle recommends setting this value above .20 or 20%. Any point below .20 may cause the task bars and task dependency lines to become compressed and hard to read. If the percentage is set less than or equal to .10 or 10%, this parameter automatically takes a value of 0, enabling the table area to occupy the entire Gantt chart area.

This parameter takes a float value.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetDayFormat

Syntax

SetDayFormat(Format)

Description

Use the SetDayFormat method to specify the format of the day on a DateTime axis.

Parameters

Format

Specify the format the day should display in. The values are:

 

Value

Description

%Chart_DayFormat

Display the day in a one- or two-digit format.

%Chart_DayFormat_2Digit

Display the day in a two-digit format.

%Chart_DayFormat_Name

Display the day using the full name, such as Monday, Tuesday, and so on.

%Chart_DayFormat_DOY

Display the day of the year in a numeric format, that is 1 — 366.

%Chart_DayFormat_DOY_ 2Digit

Display the day of the year in a two-digit numeric format, that is 01–366.

Returns

None.

See Also

SetHourFormat, SetMinuteFormat, SetMonthFormat, SetSecondFormat.

Click to jump to top of pageClick to jump to parent topicSetHourFormat

Syntax

SetHourFormat(Format)

Description

Use the SetHourFormat method to specify how the hour displays on a DateTime axis.

Parameters

Format

Specify the format the hours should be displayed in. The values are:

 

Value

Description

%Chart_HourFormat_24

Display the hour using one or two digits in a 24 hour clock, that is 0–24.

%Chart_HourFormat_24_ 2Digit

Display the hour using two digits for a 24 hour clock, that is 00–24.

%Chart_HourFormat_12

Display the hour using one or two digits using a 12-hour clock. A.M. or P.M. appears next to the value.

%Chart_HourFormat_12_ 2Digit

Display the hour using one or two digits using a 12-hour clock. A.M. or P.M. appears next to the value.

Returns

None.

See Also

SetDayFormat, SetMinuteFormat, SetSecondFormat.

Click to jump to top of pageClick to jump to parent topicSetLegend

Syntax

SetLegend(&Array_of_String)

Description

Use the SetLegend method to specify alternative legends. By default, the legends are populated from the record field specified with SetDataSeries.

This method is used to write both the overlay legend and the series legend. The labels are overwritten in the order of elements in the array, that is, the first element overwrites the first series, the second overwrites the second, and so on, with the last element in the array overwriting the overlay legend. There can be more than one series in an overlay.

If you do not specify an element for an array (that is, a blank or a null) then no legend is listed for that series.

Note. Default label text is not automatically translated. If you set your own labels, be sure to use translated text, such as message catalog entries.

Parameters

&Array_of_String

Specify an already instantiated array of string, containing the text that you want to use for the legend.

Returns

None.

Example

The following example displays a legend containing only the overlay.

&LegendArray = CreateArray("", "", "Revenue"); &MyChart.SetLegend(&LegendArray);

See Also

Chart class: SetDataSeries method.

Array Class

Click to jump to top of pageClick to jump to parent topicSetMinuteFormat

Syntax

SetMinuteFormat(Format)

Description

Use the SetMinuteFormat method to specify how minutes are displayed on the DateTime axis.

Locale-specific time separators are used to format the time.

Parameters

Format

Specify how the minutes should be displayed:

 

Value

Description

%Chart_MinuteFormat

Displays the minutes using a one- or two-digit number.

%Chart_MinuteFormat_2Digit

Displays the minutes using a two-digit number.

Returns

None.

See Also

SetHourFormat, SetSecondFormat.

Click to jump to top of pageClick to jump to parent topicSetMonthFormat

Syntax

SetMonthFormat(Format)

Description

Use the SetMonthFormat method to specify the format of months on a DateTime axis.

Parameters

Format

Specify the format of how the month should be displayed. Values are:

 

Value

Description

%Chart_MonthFormat

Display the month using a one- or two-digit number.

%Chart_MonthFormat_2Digit

Display the month using a two-digit number.

%Chart_MonthFormat_ FullName

Display the month using the full name.

Returns

None.

See Also

SetDayFormat, SetYearFormat.

Click to jump to top of pageClick to jump to parent topicSetPlannedEndDate

Syntax

SetPlannedEndDate(RecordName.FieldName)

Description

Use the SetPlannedEndDate method to specify the field in the record that defines the planned end date. If planned versus actual dates are not used, this method specifies the end date of the task.

This method is required when creating a Gantt chart.

Note. The Gantt chart logs an error to the file PSJChart.log and stops its normal processing if it finds a bad date format in any of the rows in the field associated with this method and the SetPlannedStartDate method.

Parameters

RecordName.FieldName

Specify the field and its associated record that contains the value used to define the planned end date. This field must be of DateTime or Date type.

Returns

None.

See Also

SetActualEndDate, SetActualStartDate, SetPlannedStartDate.

Click to jump to top of pageClick to jump to parent topicSetPlannedStartDate

Syntax

SetPlannedStartDate(RecordName.FieldName)

Description

Use the SetPlannedStartDate method to specify the field in the record that defines the planned start date. If planned versus actual dates are not used, this method specifies the start date of the task.

This method is required when creating a Gantt chart.

Note. The Gantt chart logs an error to the file PSJChart.log and stops its normal processing if it finds a bad date format in any of the rows in the field associated with this method and the SetPlannedEndDate method.

Parameters

RecordName.FieldName

Specify the field and its associated record that contains the value used to define the planned start date. This field must be of DateTime or Date type.

Returns

None.

See Also

SetActualEndDate, SetPlannedEndDate, SetPlannedStartDate.

Click to jump to top of pageClick to jump to parent topicSetPlannedTaskBarColor

Syntax

SetPlannedTaskBarColor(RecordName.FieldName)

Description

Use the SetPlannedTaskBarColor method to specify the field in the record that defines the colors for either the planned task bar or the planned milestone glyph.

Parameters

RecordName.FieldName

Specify the field, and its associated record, that defines the task bar color. This field must be of type number, which mean you can only use the numeric values for specifying color.

Returns

None.

See Also

SetActualTaskBarColor, TaskMilestoneGlyph.

Click to jump to top of pageClick to jump to parent topicSetSecondFormat

Syntax

SetSecondFormat(Format)

Description

Use the SetSecondFormat method to specify how seconds display on a DateTime axis.

Locale-specific time separators are used to format the time.

Parameters

Format

Specify the format for how the seconds should be displayed:

 

Value

Description

%Chart_SecondFormat

Displays the seconds using a one- or two-digit number.

%Chart_SecondFormat_2Digit

Displays seconds using a two-digit number.

Returns

None.

See Also

SetHourFormat, SetMinuteFormat.

Click to jump to top of pageClick to jump to parent topicSetTableXScrollbar

Syntax

SetTableXScrollbar(Scroll_ArrowAmount)

Description

Use the SetTableXScrollbar method to specify the amount that the scroll bar in the table section of the Gantt chart scroll data when the user clicks on the arrows or scrollbar.

Parameters

Scroll_ArrowAmount

Specify the amount to scroll in the table section of the Gantt chart when the user clicks on the horizontal scrollbar arrow. The scroll amount must be a value between zero and one. The default value is 0.10. The amount specified indicates the percentage of the table section that is scrolled when the user clicks the scroll bar.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetTaskAppData

Syntax

SetTaskAppData(RecordName.FieldName1 [, RecordName.FieldName2 [,RecordName.FieldName3. . .]])

Description

Use the SetTaskAppData method to specify the fields in the record that define the application data to be viewed in the table section.

In the table section, column one (or the left-most column) always displays the work breakdown structure (WBS) numbering (if given) and name of the task (or task ID if the name is not given). This method allows applications to define additional task data columns to be displayed in the right-most columns of the table section.

Parameters

RecordName.FieldNames

Specify the fields and their associated record that defines one or more application specific fields to be displayed as a column in the table section. The order in which the fields are given as parameters defines their column order in the table section. Because the task name (or task ID if the name is not given) is always shown in column one, the first record field value is displayed in column two.

Returns

None.

See Also

SetTaskAppDataTitles, SetTaskData, SetTaskDependencyData.

Click to jump to top of pageClick to jump to parent topicSetTaskAppDataTitles

Syntax

SetTaskAppDataTitles(&TitleArray)

Description

Use the SetTaskAppDataTitles method to specify the column titles to be displayed in the table section, starting with column two. The title for column one (that is, the left-most column) in the table section is set using the SetTaskTitle method.

The length of the array should match the number of application data fields specified with the SetTaskAppData method. Additional strings beyond the number of application data fields are not displayed. If the number of strings in the array specified by this method is less than the number of application data fields, the blanks are displayed in these title columns.

Parameters

&TitleArray

Specify an array of strings containing the column titles to be displayed in the table section.

Returns

None.

See Also

SetTaskAppData, TaskTitle.

Click to jump to top of pageClick to jump to parent topicSetTaskBarURL

Syntax

SetTaskBarURL(RecordName.FieldName)

Description

Use the SetTaskBarURL method to specify the field in the record which defines the URL the browser redirects to when the user clicks on a task bar.

By default, the FieldChange event on the planned end date field of the Gantt task data record is triggered if the image map based interactivity is turned on (using the IsDrillable property). This can be overridden by specifying a URL that is triggered when the task bar is clicked.

Use the SetTaskDependencyURL method to specify the URL to be used when the user clicks on a dependency line in the chart section.

Parameters

Record.Fieldname

Specify the field, and its associated record, that defines the URL the browser is redirected to when the task bar is clicked. This field must be of type character. The URL must be an absolute URL.

Returns

None.

See Also

SetTaskDependencyURL

IsDrillable

Click to jump to top of pageClick to jump to parent topicSetTaskData

Syntax

SetTaskData({Record.RecordName | &Rowset})

Description

Use the SetTaskData method to specify from where the task data is to be populated, either from a record or an already instantiated rowset.

Note. If you specify a rowset, the data in the rowset must be provided in the correct display order.

This method is required when you're creating a Gantt chart.

Parameters

RecordName | &Rowset

Specify the record or rowset that contains the task data. If you specify a record, you must prefix the record name with the keyword Record.

Returns

None.

See Also

SetTaskDependencyData

Click to jump to top of pageClick to jump to parent topicSetTaskDependencyChildID

Syntax

SetTaskDependencyChildID(RecordName.FieldName)

Description

The dependent task is the task where the dependency arrow ends. Use the SetTaskDependencyChildID method to specify the field in the record that defines the task ID for the dependent task.

The ID must match up to an ID in the Task data set.

This method is required if you specify dependency data.

Parameters

RecordName.FieldName

Specify the field, and its associated record, that defines the task ID for the dependant task. This field must be of type number.

Returns

None.

See Also

SetTaskDependencyData, SetTaskDependencyURL, SetTaskDependencyParentID.

Click to jump to top of pageClick to jump to parent topicSetTaskDependencyData

Syntax

SetTaskDependencyData({RecordName | &Rowset})

Description

Use the SetTaskDependencyData method to specify either a record, or an already instantiated rowset, that contains the dependency data.

Note. If you specify a rowset, the data in the rowset must be provided in the correct display order.

Parameters

RecordName | &Rowset

Specify the record or rowset that contains the task data. If you specify a record, you must prefix the record name with the keyword Record.

Returns

None.

See Also

SetTaskData, SetTaskDependencyChildID, SetTaskDependencyURL, SetTaskDependencyParentID.

Click to jump to top of pageClick to jump to parent topicSetTaskDependencyParentID

Syntax

SetTaskDependencyParentID(RecordName.FieldName)

Description

The depender task is the task where the dependency arrow originates. Use the SetTaskDependencyParentID method to specify the field in the record that defines the task ID for the depender task.

The ID must match up to an ID in the Task data set.

This method is required if you specify dependency data.

Parameters

RecordName.FieldName

Specify the field and its associated record that defines the task ID for the depender task. This field must be of type number.

Returns

None.

See Also

SetTaskDependencyChildID, SetTaskDependencyData.

Click to jump to top of pageClick to jump to parent topicSetTaskDependencyType

Syntax

SetTaskDependencyType(RecordName.FieldName)

Description

Use the SetTaskDependencyType method to specify the type of dependency relationship between predecessor and successor tasks.

The values for type are as follows:

Type

Description

Finish-to-Start

The arrow starts at the end of the predecessor task bar and ends at the start of the successor task bar. This is the default value

Finish-to-Finish

The arrow starts at the end of the predecessor task bar and ends at the end of the successor task bar.

Start-to-Start

The arrow starts at the start of the predecessor task bar and ends at the start of the successor task bar.

Start-to-Finish

The arrow starts at the start of the predecessor task bar and ends at the end of the successor task bar.

Parameters

RecordName.FieldName

Specify the field, and its associated record, that defines the type of dependencies between predecessor and successor tasks. This field must be of type integer, and one of the following values:

 

Value

Description

0 or any value greater than 3

Finish-to-Start

1

Finish-to-Finish

2

Start-to-Start

3

Start-to-Finish

Returns

None.

See Also

Gantt class: SetTaskDependencyChildID method, SetTaskDependencyData method, SetTaskDependencyParentID method.

Click to jump to top of pageClick to jump to parent topicSetTaskDependencyURL

Syntax

SetTaskDependencyURL(RecordName.FieldName)

Description

Use the SetTaskDependencyURL method to specify the field in the record that defines the URL the browser redirects to when the user clicks on a task bar.

By default, the FieldChange event on the child ID field of the task dependency record is triggered if the image map based interactivity is turned on (using the IsDrillable property). This can be overridden by specifying a URL that is triggered when the task bar is clicked.

Use the SetTaskBarURL method to specify the URL to be used when the user clicks on a task bar in the chart section.

Parameters

RecordName.FieldName

Specify the field, and its associated record, that defines the URL the browser is redirected to when the dependency arrow is clicked. This field must be of type character. The URL must be an absolute URL.

Returns

None.

See Also

SetTaskBarURL, SetTaskDependencyChildID, SetTaskDependencyData, SetTaskDependencyParentID.

Click to jump to top of pageClick to jump to parent topicSetTaskDrill

Syntax

SetTaskDrill(Recordname.FieldName)

Description

Use the SetTaskDrill method to specify for which field PeopleCode FieldEdit and FieldChange events will execute when the user clicks the task bar.

The field can be any field that is loaded in the component buffer.

The system does not change the value in the field when the user clicks the field. Any changes or other processing for the field must be done within the PeopleCode program.

Parameters

RecordName.FieldName

Specify the record name and the field name of the field to be used for field change processing. The field must be available in the component buffer.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetTaskExpanded

Syntax

SetTaskExpanded((RecordName.FieldName)

Description

Use the SetTaskExpanded method to specify the field in the record that defines the expanded state of parent tasks.

Whenever an end user changes the expanded state by clicking on the expand (collapse) icon in the table section, the expanded state in the rowset is updated. In addition, a field change event occurs to allow applications to synchronize expanded state changes with other parts of their application.

Parameters

RecordName.FieldName

Specify the field, and its associated record, that defines the text in the task hint pop-up. This field must be of type character, that is, Y or N.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetTaskHints

Syntax

SetTaskHints(RecordName.FieldName)

Description

Use the SetTaskHints method to specify the field in the record which defines the task hint pop-up text. The description is displayed in a pop-up bubble when a cursor hovers over the task bar or milestone glyph.

Parameters

RecordName.FieldName

Specify the field, and its associated record, that defines the text in the task hint pop-up. This field must be of type character.

Returns

None.

See Also

SetTaskID, SetTaskName.

Click to jump to top of pageClick to jump to parent topicSetTaskID

Syntax

SetTaskID(Recordname.FieldName)

Description

Use the SetTaskID method to specify the field that defines the unique task identifier. The task ID is used to support task linking and dependencies.

This method is required when you're creating a Gantt chart.

Parameters

RecordName.FieldName

Specify the record name and the field name of the field that defines the unique task identifier. The field must be of type number.

Returns

None.

See Also

SetTaskName

Click to jump to top of pageClick to jump to parent topicSetTaskLabel

Syntax

SetTaskLabel(RecordName.FieldName)

Description

Use the SetTaskLabel method to specify the field in the record that defines the task label. The label is displayed alongside its corresponding task bar in the chart area. If a task label is not provided, the task name is used instead. If a task name is not provided, the task id is used.

Parameters

RecordName.FieldName

Specify the field, and its associated record, that contains the task label. This field must be of type character.

Returns

None.

See Also

SetTaskID, SetTaskName.

Click to jump to top of pageClick to jump to parent topicSetTaskLevel

Syntax

SetTaskLevel(RecordName.FieldName)

Description

Use the SetTaskLevel method to specify the field in the record that defines the level for the task. The outermost summary tasks are always defined as task level one. Tasks with task levels greater than one are subtasks. Subtasks may also contain other subtasks.

If a field is not provided to define the level, all tasks are defined at level 1. A maximum of 32 levels are supported.

The following table shows an example of the different levels that could be used, as well as what the parent task level is.

Note. The parent task is not actually part of the data.

Task Name

Task Level

Parent Level

Phase I

1

None

Evaluation

2

Phase I

Research

3

Evaluation

Report Findings

3

Evaluation

Create Budget

2

Phase I

Approve Budget

3

Create Budget

Phase II

1

None

Code and Test

2

Phase II

Phase III

1

None

Training

2

Phase III

Parameters

RecordName.FieldName

Specify the field, and its associated record, that contains the information about the task level. This field must be of type number. Up to 32 levels are supported.

Returns

None.

See Also

SetTaskID

Click to jump to top of pageClick to jump to parent topicSetTaskMilestone

Syntax

SetTaskMilestone(RecordName.FieldName)

Description

Use the SetTaskMilestone method to specify the field in the record that defines whether the task should be treated as a milestone.

The fields specified by the SetPlannedStartDate and SetActualStartDate methods are used for determining the dates for the planned and actual milestones. The other date fields in the rowset are ignored

Parameters

RecordName.FieldName

Specify the field and its associated record that defines whether the task should be treated as a milestone. The field must be of type Character, and be one character long. The possible values for this field are Y, used to specify that this task is a milestone, or N, if not.

Returns

None.

See Also

SetActualStartDate, SetTaskMilestone, SetPlannedStartDate.

Click to jump to top of pageClick to jump to parent topicSetTaskName

Syntax

SetTaskName(RecordName.FieldName)

Description

Use the SetTaskName method to specify the field in the record that defines the task name. If you do not specify a task name, the task ID is used in the table section of the Gantt chart.

 

Although this method is not required, Oracle recommends using it to display meaningful information in the table section of the Gantt chart.

Parameters

RecordName.FieldName

Specify the field name and its associated record that defines the task name. The field must be of type character.

Returns

None.

See Also

SetTaskID

Click to jump to top of pageClick to jump to parent topicSetTaskProgress

Syntax

SetTaskProgress(RecordName.FieldName)

Description

Use the SetTaskProgress method to specify the field in the record that defines the length of the progress bar for this task as shown in the chart area of the Gantt chart.

The value in the field must be between 0 and 100, inclusive. Zero indicates no progress bar is shown, 100 indicates that the progress bar should cover the entire length of the task bar. Values greater than 100 are automatically converted to 100.

Parameters

RecordName.FieldName

Specify the field, and its associated record, that defines the length of the progress bar for this task. This field must be of type number. The value in the field must be between 0 and 100, inclusive. You must not specify a value greater than 100.

Returns

None.

See Also

SetTaskProgressBarColor

Click to jump to top of pageClick to jump to parent topicSetTaskProgressBarColor

Syntax

SetTaskProgressBarColor(RecordName.FieldName)

Description

Use the SetTaskProgressBarColor method to specify the field in the record that defines the color for the progress bar.

For the progress bar to be visible, its color must contrast with the task bar color. No borders are drawn around the progress bar.

Parameters

RecordName.FieldName

Specify the field, and its associated record, that defines the task progress bar color. This field must be of type numeric, which means that you can only use the numeric value for the chart colors, not the constant.

Returns

None.

See Also

SetActualTaskBarColor, SetTaskProgress.

Click to jump to top of pageClick to jump to parent topicSetWBSNumbering

Syntax

SetWBSNumbering(RecordName.FieldName)

Description

Use the SetWBSNumbering method to specify the field in the record that defines the WBS numbering to be displayed for each task row in the table section of the Gantt chart.

A WBS is very similar in structure and layout to a document outline. Each item at a specific level of a WBS is numbered consecutively (that is, 10, 20, 30, 40, 50). Each item at the next level is numbered within the number of its parent item (that is, 10.1, 10.2, 10.3, 10.4). For example:

1. 1.1 1.1.1 1.1.2 1.1.3 1.2 1.2.1 1.2.2 2. . . .

If no field name is provided, WBS numbering is not displayed along with the tasks.

Regardless if WBS numbering is provided, child tasks are indented to the right of their parent task.

Parameters

RecordName.FieldName

Specify the field name and its associated record that defines the WBS numbering to be displayed. The field must be of type character.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetYearFormat

Syntax

SetYearFormat(Format)

Description

Use the SetYearFormat method to specify the format of years on the DateTime axis.

Parameters

Format

Specify the format of how the year should be displayed. Values are:

 

Value

Description

%Chart_YearFormat

Display the year in a numeric one- or two-digit format.

%Chart_YearFormat_2Digit

Display the year in a numeric two-digit format.

%Chart_YearFormat_4Digit

Display the year in a numeric four-digit format.

Returns

None.

See Also

SetDayFormat, SetMonthFormat.

Click to jump to parent topicGantt Class Properties

These properties are used by the Gantt class. The properties are described in alphabetic order.

Click to jump to top of pageClick to jump to parent topicAxisEndDateTime

Description

Use this property to specify the date and time where the chart axis should end. The value must be of type Date or DateTime.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicAxisStartDateTime

Description

Use this property to specify the date and time where the chart axis should begin. The value must be of type Date or DateTime.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicDataEndDateTime

Description

Use this property to specify where the chart should stop displaying data. The value must be of type DateTime.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicDataStartDateTime

Description

Use this property to specify where the chart should start displaying data. The value must be of type DateTime.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicDataStartRow

Description

This property sets or returns the row number (after any preprocessing) at which to start plotting. This is useful when you have many rows of data in a rowset, and you want to start at a particular row. This can also be useful for creating your own 'scrolling' effect, by specifying both the start row and how many rows to be displayed (by using the DataWidth property).

If this property is not set, then the value is 1.

This property is read-write.

See Also

Chart class: DataWidth property.

Click to jump to top of pageClick to jump to parent topicDataWidth

Description

This property returns or sets the number of rows to plot for a series. The starting point for the number of rows is set with the DataStartRow property. If the DataWidth property value is not set, then the width is from the DataStartRow to the last element in the rowset. If the property value is less than zero, then it will automatically be set to one.

This property is read-write.

Example

Suppose your rowset returned 400 rows. You wouldn't want all 400 to display in your chart. Instead, you'd pick a subset of those rows. The row to start with is set with DataStartRow, while how many rows to display is set with DataWidth.

The following code could be used with a push button connected with a chart. The push button enables the next set of data to be displayed with the chart. You don’t need to refresh after setting this property. When a method or property is used, the chart is automatically refreshed.

Local Chart &MyChart; &MyChart = GetChart(ChartRec.DisplayField); &Start = &MyChart.DataStartRow; /* display the next 20 rows of data */ &MyChart.DataStartRow = &Start + 20; &MyChart.DataWidth = 20;

See Also

Chart class: DataStartRow property.

Click to jump to top of pageClick to jump to parent topicGridLines

Description

Use this property to specify whether to show grid lines with the chart.

Note. This property is ignored unless you have set RevertToPre850 to True for the chart.

Gantt charts only support the %ChartGrid_Vertical and %ChartGrid_None values.

Grid lines are shown within the chart section of the Gantt chart, if enabled, and are tied to the major tick mark. The major tick mark is associated with the smallest time increment displayed on the DateTime axis using the SetFormat functions such as the SetMonthFormat, SetDayFormat, and so on. For example, if you choose to display both years and months on the DateTime axis, the major tick marks denote the months.

If you do not specify a value, no grid lines are shown.

This property controls only the display of grid lines. If you want to specify the style of the grid lines, use the GridLineType property.

The values are:

Numeric Value

Constant Value

Description

0

%ChartGrid_None

Don't show grid lines (default)

2

%ChartGrid_Vertical

Show vertical grid lines

This property is read-write.

See Also

GridLineType

Click to jump to top of pageClick to jump to parent topicGridLineType

Description

Use this property to specify the style of the grid lines when either or both vertical or horizontal grid lines are turned on.

Note. This property is ignored unless you have set RevertToPre850 to True for the chart.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

The default value is %ChartLine_Solid. The possible values are:

Value

Description

%ChartLine_Solid

Draw grid lines with solid lines.

%ChartLine_Dash

Draw grid lines with lines composed of dashes.

%ChartLine_Dot

Draw grid lines with lines composed of dots.

%ChartLine_DashedDot

Draw grid lines with lines composed of both dashes and dots.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicHasLegend

Description

Use this property to specify if a legend is displayed with the chart. This property takes a Boolean value: True, if the legend is displayed with the chart, False otherwise.

The default value is False.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicHeight

Description

Use this property to specify the height of the chart. This property takes a numeric value. The unit of measurement is pixels.

Generally this property is used with charts created for iScripts, to specify the height of the image, before generating the image map. You can also use it to overwrite the height set in PeopleSoft Application Designer.

If you try to read this property before setting it, the value returned is zero.

This property is read-write.

See Also

Chart class: Height property.

Click to jump to top of pageClick to jump to parent topicImageMap

Description

This property returns the HTML client-side image map. The image map is what makes the chart interactive.

This property is read-only.

See Also

Creating a Chart Using an iScript.

Click to jump to top of pageClick to jump to parent topicInteractiveEnd

Description

Use this property to specify whether the user can change the end date of a task by dragging and dropping.

This property takes a Boolean value: True if the user can change the end date, False otherwise.

The default value of this property is False.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicInteractiveMove

Description

Use this property to specify whether the user can move a task bar by dragging and dropping.

This property takes a Boolean value: True if the user can move the bar, False otherwise.

The default value of this property is True.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicInteractiveProgress

Description

Use this property to specify whether the user can change the progress value of a task by dragging and dropping.

This property takes a Boolean value: True if the user can change the progress value, False otherwise.

The default value of this property is True.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicInteractiveStart

Description

Use this property to specify whether the user can change the start date of a task by dragging and dropping.

This property takes a Boolean value: True if the user can change the start date, False otherwise.

The default value of this property is False.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicIsDrillable

Description

The IsDrillable property is used with the task bars as well as the task dependency lines in the chart section of a Gantt chart. Where the user is directed depends on whether a URL is provided or not, as detailed in this table:

User Action

If URL is not provided:

If URL is provided:

Clicks a task bar.

FieldChange event is associated with the Planned End Date field in the Task table.

Redirects to URL provided by field identified using the SetTaskBarURL method.

Clicks a task dependency line.

FieldChange event is associated with the Child ID field in the Task Dependency table.

Redirects to URL provided by field identified using the SetTaskDependencyURL method.

Clicks an expand/collapse icon.

FieldChange event is associated with the task data.

Redirects to URL provided by field identified using the SetTaskBarURL method.

This property takes a Boolean value: True if the end-user can click the chart to initiate an action, and False otherwise.

Note. Setting this property has no effect if the IsPlainImage property is set as True.

Note. When using a chart in an iScript, this property must be used in conjunction with the SetDataURLs method. The SetDataURLs method must point to a field that is populated with the URLs to be triggered for each data point in the chart.

The default value for this property is False.

This property is read-write.

See Also

IsPlainImage

Click to jump to top of pageClick to jump to parent topicIsPlainImage

Description

Use this property to specify whether the chart is built without any extra HTML, such as SRC or MAP tags.

If this property is specified as True, the end-user will not be able to click on the chart to trigger an event. In addition, the pop-up data hints will not appear when the end-user passes a mouse over the chart. However, you may see a performance improvement if your chart has an extremely complicated image map and you specify this property as True.

This property takes a Boolean value: True if the chart is built without extra HTML, False otherwise.

The default value of this property is False.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicLegendPosition

Description

Use this property to specify where the legend should appear, in relationship to the chart. You can specify either a numeric or constant value for this property.

Note. ChartLegend_Separate generates a legend without a chart. The legend takes over the entire charting area. The legend appears in the center of the chart.

The values are:

Numeric Value

Constant Value

Description

0

%ChartLegend_Left

Display legend to the left of the chart.

1

%ChartLegend_Right

Display legend to the right of the chart.

2

%ChartLegend_Top

Display legend on top of the chart.

3

%ChartLegend_Bottom

Display legend below the chart.

4

%ChartLegend_Separate

Generate a legend without a chart.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicLegendStyle

Description

Use this property to specify the style of the legend. The values for this property are the style classes contained in the style sheet associated with the chart.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicMainTitle

Description

Use this property to specify the text for the main title of the chart.

This property takes a string value.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicMainTitleStyle

Description

Use this property to specify the style of the main title. The values for this property are the style classes contained in the style sheet associated with the chart.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicPixelsPerRow

Description

This property returns an integer value of the row height (in pixels) for each row in the table section. Use this property to properly size the height of the table section of your Gantt chart so that all rows in the table are displayed. You can do so by multiplying the value for the PixelsPerRow property by the number of visible rows in the rowset.

The system calculates the value of the PixelsPerRow property at runtime after the Gantt image is rendered. To do so, this property must be read after the PeopleCode Activate event. This can be done by reading in the PixelPerRow value during a FieldChange event on a refresh button on the page.

This property is read-only.

Click to jump to top of pageClick to jump to parent topicRevertToPre850

Description

PeopleTools Version 8.50 implements new chart style classes that bring a consistent look and feel to charts.

Use this property to specify whether the chart will revert to the pre-PeopleTools 8.50 chart style classes.

Warning! By default RevertToPre850 is set to False, which means that charts that were created prior to PeopleTools 8.50 will use the new 8.50 chart style classes.

Any custom Chart class properties that were set in PeopleCode for existing charts that use the new 8.50 chart style classes will be ignored if those properties are defined in the 8.50 chart style classes.

Oracle strongly recommends that you review existing charts to verify that they display correctly.

This property takes a Boolean value:

True

Do not use the PeopleTools 8.50 style classes for this chart so that the chart will maintain its original appearance.

False

Use the PeopleTools 8.50 style classes for this chart.

Any chart properties that are set in application PeopleCode may be overridden by the 8.50 style classes.

The default is False.

This property is read-write.

See Also

Chart class: OLLineType property.

Click to jump to top of pageClick to jump to parent topicShowTaskLabels

Description

Use this property to specify whether or not task labels are displayed alongside the corresponding task bar in the chart area. This property takes a boolean value; true to display the labels, false to not display the labels. The default is to display the labels.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicStyle

Description

A style sheet is a definition, like a record or field definition, that you create in PeopleSoft Application Designer. It contains a collection of formatting styles, called classes, each of which can be applied to either the entire chart or to specific elements within a chart.

Use this property to specify the overall style of the chart by specifying a style class. The value must be a valid class within the style sheet specified for the chart.

Individual style properties (such as SetXAxisStyle, MainTitleStyle, and so on) can be used to override this value for individual elements of the chart.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

Click to jump to top of pageClick to jump to parent topicStyleSheet

Description

Use this property to associate a style sheet with a chart.

The PTSTYLEDEF style sheet is the default style sheet associated with a chart.

Both the Style property for the chart, and individual style properties (such as SetXAxisStyle, MainTitleStyle, and so on) can be used to override this value for individual elements of the chart.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

Click to jump to top of pageClick to jump to parent topicTaskDependencyLineType

Description

Use this property to specify an integer value that specifies the line type of the line connecting dependent tasks. This value affects all the dependency lines for the entire Gantt chart, not just for a specific set of tasks.

This property is read-write.

See Using Style Sheets with PeopleTools Version 8.50 Charts, RevertToPre850.

Numeric Value

Constant Value

Description

0

%ChartLine_Solid

Solid line

1

%ChartLine_Dashed

Dashed line

2

%ChartLine_Dotted

Dotted line

3

%ChartLine_Mixed

Mixture of dashes and dots

Click to jump to top of pageClick to jump to parent topicTaskMilestoneGlyph

Description

Use this property of type integer to specify which field in the record defines the glyph to represent a task milestone (for both planned and actual milestones). This glyph is used for the entire chart, not just for a specific task.

By default a diamond shaped glyph will be used.

Milestones associated with planned dates use colors defined by the SetPlannedTaskBarColor method. Milestones associated with actual dates use colors defined by the SetActualTaskBarColor method.

This property is read-write.

See Also

Using Gantt Glyphs

Click to jump to top of pageClick to jump to parent topicTaskTitle

Description

Use this property to specify the column title to be displayed in column one (that is, the left-most column) in the table section of the Gantt chart. Use the SetTaskAppDataTitles method to specify the column titles for the application specific data fields (that is, column two and beyond).

This property is read-write.

See Also

SetTaskAppDataTitles

Click to jump to top of pageClick to jump to parent topicWidth

Description

Use this property to specify the width of the chart. This property takes a numeric value. The unit of measurement is pixels.

Generally this property is used with charts created for iScripts, to specify the width of the image, before generating the image map. You can also use it to overwrite the width set in PeopleSoft Application Designer.

If you try to read this property before setting it, the value returned is zero.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicXAxisPosition

Description

Use this property to specify the position of the X axis relative to the Y axis.

Note. This property is not supported in Gantt charts.

You can use either a constant or a numeric value for this property. Valid values are:

Numeric Value

Constant Value

Description

1

%ChartAxis_ZeroPosition

Positions the axis in line with the 0 on the opposite axis. Default position for the axis.

2

%ChartAxis_LowPosition

Positions the axis in line with the lowest value on the opposite axis.

3

%ChartAxis_HighPosition

Positions the axis in line with the highest value on the opposite axis.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicYAxisPosition

Description

Use this property to specify the position of the Y axis relative to the X axis.

Note. This property is not supported in Gantt charts.

You can use either a constant or a numeric value for this property. Valid values are:

Numeric Value

Constant Value

Description

1

%ChartAxis_ZeroPosition

Positions the axis in line with the 0 on the opposite axis. Default position for the axis.

2

%ChartAxis_LowPosition

Positions the axis in line with the lowest value on the opposite axis.

3

%ChartAxis_HighPosition

Positions the axis in line with the highest value on the opposite axis.

This property is read-write.

Click to jump to parent topicOrgChart Class Methods

These methods are used by the OrgChart class. The methods are described in alphabetic order.

Click to jump to top of pageClick to jump to parent topicSetCrumbData

Syntax

SetCrumbData(&Rowset)

Description

Use the SetCrumbData method to specify the source for the data for the organization chart breadcrumbs. Use an already instantiated and populated level-1 component rowset that contains the breadcrumb data.

Parameters

&Rowset

A level-1 rowset populated with the breadcrumbs data.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetCrumbRecord

Syntax

SetCrumbRecord(Record.Record_Name)

Description

Use the SetCrumbRecord method to specify the derived/working record name that contains the information about the breadcrumbs.

The breadcrumb record is an application-specific derived/work record created using a clone of the PTORGCRMB_SBR subrecord definition.

Parameters

Record.Record_Name

Specify the name of the derived/work record that contains the data for the breadcrumbs.

You must include the Record keyword.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetDropdownData

Syntax

SetDropdownData (&Rowset)

Description

Use the SetDropdownData method to specify the source for the data for the organization chart drop-down list boxes. Use an already instantiated and populated level-1 component rowset that contains the drop-down list data.

Parameters

&Rowset

A level-1 rowset populated with the drop-down list data.

Returns

None

Click to jump to top of pageClick to jump to parent topicSetDropdownRecord

Syntax

SetDropDownRecord(Record.RecordName)

Description

Use the SetDropdownRecord method to specify the derived/working record name that contains the information about the dropdown lists.

The dropdown record is an application-specific derived/work record created using a clone of the PTORGBOXLIST_SBR subrecord definition.

Parameters

Record_Name

Specify the name of the derived/work record that contains the data for the drop down lists.

You must include the Record keyword.

Returns

None

Click to jump to top of pageClick to jump to parent topicSetLegend

Syntax

SetLegend(&Array_of_String)

Description

Use the SetLegend method to specify legend text. Legend text labels the images set using SetLegendImg.

If you do not specify an element for an array (that is, a blank or a null) then no legend is listed for that node.

Note. Legend text is not automatically translated. If you set your own labels, be sure to use translated text, such as message catalog entries.

Parameters

&Array_of_String

Specify an already instantiated array of string, containing the text that you want to use for the legend.

Returns

None.

Example

&LegendArray = CreateArray("A", "B", C", "D "); &ocOrgChart.SetLegend (&LegendArray);

See Also

Chart class: SetDataSeries method.

Array Class

Click to jump to top of pageClick to jump to parent topicSetLegendImg

Syntax

 

SetLegendImg(&Array_of_String)

Description

Use the SetLegendImg method to specify the legend image names.

Parameters

&Array_of_String

An already instantiated array containing the names of the images that you want to use with the legend.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetNodeData

Syntax

SetNodeData(&Rowset)

Description

Use the SetNodeData method to specify the source for the node data for the organization chart. Use an already instantiated and populated level-1 component rowset that contains the node data.

This is a required method to build an organization chart.

If you make a change to the underlying data of a chart, call the SetNodeData method again to update the chart.

Parameters

&Rowset

A level-1 component rowset populated with the node data. This rowset references the node record of the chart.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetNodeRecord

Syntax

SetNodeRecord(Record.Record_Name)

Description

Use the SetNodeRecord method to specify the organization node record.

The node record is an application-specific derived/work record created using a clone of the PTORGNODE_SBR subrecord definition.

This method is required to build an organization chart.

Parameters

Record.Record_Name

Specify the name of the derived/work record that contains the data for the organization node.

You must include the Record keyword.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetPopUpNodeData

Syntax

SetPopUpNodeData(&Rowset)

Description

Use the SetPopUpNodeData method to specify the source for the pop-up node data for the organization chart. Use an already instantiated and populated level-1 component rowset that contains the pop-up node data.

This method is not required if no pop-up chart is available to be displayed in the organization chart.

If you make a change to the underlying data of a pop-up chart, call the SetPopUpNodeData method again to update the chart.

Parameters

&Rowset

A level-1 rowset populated with the pop-up node data. This rowset references the pop-up node record of the chart.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetPopUpNodeRecord

Syntax

SetPopUpNodeRecord(Record.Record_Name)

Description

Use the SetNodeRecord method to specify the pop-up node record.

The node record is an application-specific derived/work record created using a clone of the PTORGPOPUP_SBR subrecord definition.

This method is not required if no pop-up chart is available to be displayed in the organization chart.

Parameters

Record.Record_Name

Specify the name of the derived/work record that contains the data for the pop-up node.

You must include the Record keyword.

Returns

None.

Click to jump to parent topicOrgChart Class Properties

These properties are used by the OrgChart class. The properties are described in alphabetic order.

Click to jump to top of pageClick to jump to parent topicCenterFocusNode

Description

Specify whether the node with focus displays centered in the chart area.

Value

Direction

0

Center the focus node

2

Do not center the focus node

The focus node is not centered if the chart fits in the chart area without a horiztonal scroll, even if CenterFocusNode = 0.

The focus node is not centered if any pop-ups are opened. The display of pop-ups in the visible chart area takes priority over focus node centering.

Note. If multiple pop-ups are opened, the last popup opened is not necessarily set to the visible area. This is determined by the position of the pop-up in the rowset.

The default is 0.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicChartScrollType

Description

Specify whether to use scroll bars or alternative scrolling to move the chart within the visible chart area.

Value

Direction

0

Use scroll bars

1

Use alternative scrolling. This allows the user to use the scroll navigator or to grab the surface of the organization chart background to move the chart in any direction.

Note. To use the mouse hand feature, the chart background color must be specified in the PSORGCHART style sheet. By default, the background color is white.

Note. On an Apple iPad navigation is done using a finger on a touch screen, so scroll bars, the scroll navigator, and mouse hand features are not displayed on an Apple iPad. For an Apple iPad the behavior is the same for both ChartScrollType = 1 and ChartScrollType = 0.

This property takes an integer value.

The default is 0.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicCollapsed_Msg

Description

Specify the mouseover text message for the collapsed icon image.

An error message is issued if Collapsed_Msg is set but CollapsedImage is not set.

The default is “Expand”.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicCollapsedImage

Description

Specify the name of the collapsed node image.

If the CollapsedImage and ExpandedImage properties are not specified, then no expanded/collapsed icon appears on the node and the expand/collapse actions are disabled.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicCollapseMainIconSpace

Description

Specify whether to reduce the space at the top of the node reserved for the main icon..

Value

Direction

0

Reserve space at the top of the node for the main icon.

1

Reduce the space at the top of the node reserved for the main icon.

This property takes an integer value.

The default is 0.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicCrumbDescrStyle

Description

Use this property to specify the style class name that will be used to control the style of linkable breadcrumbs.

The default style class is PT_ORGCHART_BRDCRM.

Oracle recommends that you use the default breadcrumb style.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicCrumbMaxDisplayLength

Description

Use this property to set the maximum description length that will appear for the breadcrumb.

A breadcrumb description has a maximum of 50 characters in length. If CrumbMaxDisplayLength is set to 30, then only the first 30 characters of the description appear and an ellipsis ( “…” ) is appended.

On mouseover, the whole text of the breadcrumb appears.

The default is to show the full description.

This property takes a number value.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicCrumbSeparatorImage

Description

Use this property to specify the image name for the image that appears between breadcrumb entries.

If this property is not set, then no image appears between breadcrumb entries. Instead, breadcrumb entries are separated by three spaces.

This property takes a string value.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicDefaultImage

Description

Use this property to set the default image name for the image that will appear if ImageLocation is not 0 and no image is set in the work record.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicDirection

Description

Use this property to specify chart node direction.

Value

Direction

0

Left to Right

2

Up to Down

For an organization chart, the only valid values are 0 (Left to Right) and 2 (Up to Down).

The default is 2 (Up to Down).

This property is read-write.

Click to jump to top of pageClick to jump to parent topicDropDownBoxStyle

Description

Specify the style for the drop-down list box header for the organization chart.

Value

Description

PT_ACTION_POSITION

The button appears to left, aligned with the other descriptors.

PT_ACTION_POSITION_RIGHT

The button appears to right.

PT_ACTION_POSITION_CENTER

The button appears in the center of the node.

The default style class is PT_ACTION_POSITION.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicExpanded_Msg

Description

Specify the mouseover text message for the expanded icon image.

An error message is issued if Expanded_Msg is set but ExpandedImage is not set.

The default is “Collapse”.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicExpandedImage

Description

Specify the name of the expanded node image.

If the CollapsedImage and ExpandedImage properties are not specified, then no expanded/collapsed icon appears on the node and the expand/collapse actions are disabled.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicHasLegend

Description

Use this property to specify if a legend appears with the chart. This property takes a Boolean value: True if the legend appears with the chart, and False otherwise.

The default value is False.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicHeight

Description

Use this property to specify the height of the chart. This property takes a numeric value. The unit of measurement is pixels.

If you try to read this property before setting it, the value returned is 0.

This property is read-write.

See Also

Chart class: Height property.

Click to jump to top of pageClick to jump to parent topicImageHeight

Description

Use this property to specify the height of the node image. This property takes a numeric value. The unit of measurement is pixels.

Note. If ImageHeight is very large relative to the chart, tooltips may not have room to display properly. If this occurs, you need to reduce ImageHeight or increase chart size.

The default is 0.

This property is read-write.

See Also

Chart class: Height property.

Click to jump to top of pageClick to jump to parent topicImageLocation

Description

Use this property to specify chart node image location:

Value

Direction

0

No image

1

Image on the left

2

Image on the right

The default is 0 (No image).

This property is read-write.

Click to jump to top of pageClick to jump to parent topicImageMouseoverMagnificationFactor

Description

Use this property to specify the mouseover magnification factor on the node image. This property takes a numeric value. A value of 100 produces a mouseover image the same size as the node image. If the value is set to 0 or 100, no image magnification will occur.

Note. ImageMouseoverMagnificationFactor is ignored on the Apple iPad. On an Apple iPad the user is able to zoom the entire page to enlarge the image.

Valid values are 0 to 1000.

The default is 0.

This property is read-write.

See Also

Chart class: Height property.

Click to jump to top of pageClick to jump to parent topicLegendPosition

Description

The OrgChart class only supports %ChartLegend_Top, which is to display the legend on top of the chart.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicLegendStyle

Description

Use this property to specify the style of the legend. The values for this property are the style classes contained in the style sheet associated with the chart.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_ORGCHART_LEGEND.

This property is read-write.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicLegendTopSpace

Description

Use this property to set the space between the breadcrumb and legend.

The default is no space between the legend and the breadcrumbs.

This property is read-write.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicMainTitle

Description

Use this property to specify the text for the main title of the chart.

This property takes a string value.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicMainTitleStyle

Description

Use this property to specify the style of the main title. The values for this property are the style classes contained in the style sheet associated with the chart.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default value is “PT_ORGCHART_TITLE”.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicMaxDropdownDisplayItem

Description

Specify the maximum number of list items that will appear in the drop down box before the up-and-down arrow vertical scrolling is implemented.

This property takes an integer value.

The default value is 7.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicMaxPopupDisplayNode

Description

The maximum number of nodes to be displayed in the pop-up before a vertical scrollbar appears in the pop-up.

For instance, if MaxPopupDisplayNode is set to 3 and the pop-up has more than 3 nodes, then the pop-up will only display the first 3 nodes with a scrollbar in the pop-up so the user can scroll down to see the other nodes.

The default value is 3.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicNodeDescr1Style

Description

The style class name that will be used to control the style of the main chart node descriptor number 1.

Each node can have up to seven descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_ORGNODE_DESC1.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicNodeDescr2Style

Description

The style class name that will be used to control the style of the main chart node descriptor number 2.

Each node can have up to seven descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_ORGNODE_DESC2.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicNodeDescr3Style

Description

The style class name that will be used to control the style of the main chart node descriptor number 3.

Each node can have up to seven descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_ORGNODE_DESC3.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicNodeDescr4Style

Description

The style class name that will be used to control the style of the main chart node descriptor number 4.

Each node can have up to seven descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_ORGNODE_DESC4.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicNodeDescr5Style

Description

The style class name that will be used to control the style of the main chart node descriptor number 5.

Each node can have up to seven descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_ORGNODE_DESC5.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicNodeDescr6Style

Description

The style class name that will be used to control the style of the main chart node descriptor number 6.

Each node can have up to seven descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_ORGNODE_DESC6.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicNodeDescr7Style

Description

The style class name that will be used to control the style of the main chart node descriptor number 7.

Each node can have up to seven descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_ORGNODE_DESC7.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicNodeMaxDisplayDescLength

Description

Set the maximum descriptor length that will appear in the node.

If the full descriptor text is longer than NodeMaxDisplayDescLength, then an ellipsis (“…”) is appended to the displayed text. The entire text appears in a mouseover.

The default value is 50 characters.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicOptimizeHorizontalSpace

Description

Set this property to automatically maximize or minimize the chart area horizontally.

Value

Direction

0

Use the specified size.

1

Expand horizontally to the right edge of the browser page.

This option should only be used when there is only blank space to the right of the chart. Otherwise, any objects in that area will be pushed off the viewable area.

2

Contract horizontally to just to the right of the node furthest to the right.

3

Fit the chart area to the chart horizontally.

This property takes an integer value.

The default is 0.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicOptimizeVerticalSpace

Description

Set this property to automatically maximize or minimize the chart area vertically.

Value

Direction

0

Use the specified size.

1

Expand vertically to the right edge of the browser page.

This option should only be used when there is only blank space at the bottom of the chart. Otherwise, any objects in that area will be pushed off the viewable area.

2

Contract vertically to just below the bottom of the last visible chart node.

3

Fit the chart area to the chart vertically.

This property takes an integer value.

The default is 0.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicPopupHeaderStyle

Description

The style class that will be used to control the style of the pop-up header and the header descriptor.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_POPUPNODE_HEADER.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicPopupNodeDescr1Style

Description

The style class name that will be used to control the style of the pop-up node descriptor number 1.

Each node can have up to eight descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_POPUPNODE_DESC1.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicPopupNodeDescr2Style

Description

The style class name that will be used to control the style of the pop-up node descriptor number 2.

Each node can have up to eight descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_POPUPNODE_DESC2.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicPopupNodeDescr3Style

Description

The style class name that will be used to control the style of the pop-up node descriptor number 3.

Each node can have up to eight descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_POPUPNODE_DESC3.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicPopupNodeDescr4Style

Description

The style class name that will be used to control the style of the pop-up node descriptor number 4.

Each node can have up to eight descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_POPUPNODE_DESC4.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicPopupNodeDescr5Style

Description

The style class name that will be used to control the style of the pop-up node descriptor number 5.

Each node can have up to eight descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_POPUPNODE_DESC5.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicPopupNodeDescr6Style

Description

The style class name that will be used to control the style of the pop-up node descriptor number 6.

Each node can have up to eight descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_POPUPNODE_DESC6.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicPopupNodeDescr7Style

Description

The style class name that will be used to control the style of the pop-up node descriptor number 7.

Each node can have up to eight descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_POPUPNODE_DESC7.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicPopupNodeDescr8Style

Description

The style class name that will be used to control the style of the pop-up node descriptor number 8.

Each node can have up to eight descriptors, each with its own style.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_POPUPNODE_DESC8.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicStyle

Description

A style sheet is a definition, like a record or field definition, that you create in PeopleSoft Application Designer. It contains a collection of formatting styles, called classes, each of which can be applied to either the entire chart or to specific elements within a chart.

Use this property to specify the overall style of the chart by specifying a style class. The value must be a valid class within the style sheet specified for the chart.

Individual style properties (such as Legend Style, MainTitleStyle, and so on) can be used to override this value for individual elements of the chart.

The default style class is PT_ORGCHART.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicSuppressPeopleCodeOnNode

Description

Specify whether to suppress processing, such as re-centering the chart, when a user clicks on a chart node if no PeopleCode is associated with the node.

This property takes a Boolean value: True to suppress a click on a chart node, and False otherwise.

The default value is False.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicSuppressPeopleCodeOnImage

Description

Specify whether to suppress a processing, such as re-centering the chart, when a user clicks on a chart image if no PeopleCode is associated with the image.

This property takes a Boolean value: True to suppress a click on a chart image, and False otherwise.

The default value is False.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicUnlinkCrumbDescrStyle

Description

Use this property to specify the style class name that will be used to control the style of the unlinkable breadcrumb.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_ORGCHART_UNLINK_BRDCRM.

Oracle recommends that you use the default breadcrumb unlinkable style.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicVerticalSpace

Description

Use this property to specify the amount of space above the first level of nodes in an organization chart. If the chart has a legend, the vertical space is measured as the distance from the top of the first level of nodes to the bottom of the legend. If the chart has no legend, the vertical space is the distance from the top of the first level of nodes to the top of the chart area.

This property only applies to charts with a vertical orientation (Direction = 2).

This property takes a numeric value. The unit of measurement is pixels.

The default value is 10 pixels.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicWidth

Description

Use this property to specify the width of the chart. This property takes a numeric value. The unit of measurement is pixels.

If you try to read this property before setting it, the value returned is 0.

This property is read-write.

Click to jump to parent topicRatingBoxChart Class Methods

These methods are used by the RatingBoxChart class. The methods are described in alphabetic order.

Click to jump to top of pageClick to jump to parent topicSetLegend

Syntax

SetLegend(&Array_of_String)

Description

Use the SetLegend method to specify legend text. Legend text labels the images set in the RatingBoxChart class method SetLegendImg.

Note. Legend text is not automatically translated. Be sure to use translated text, such as message catalog entries.

Parameters

&Array_of_String

Specify an already instantiated array of string, containing the text that you want to use for the legend.

Returns

None.

Example

&LegendArray = CreateArray("A","B", C","D"); &oRatingBoxChart.SetLegend(&LegendArray);

See Also

SetDataSeries, SetLegendImg.

Array Class

Click to jump to top of pageClick to jump to parent topicSetLegendImg

Syntax

SetLegendImg(&Array_of_String)

Description

Use the SetLegendImg method to specify the legend image names.

Parameters

&Array_of_String

An already instantiated array containing the names of the images that you want to use with the legend.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetRBNodeData

Syntax

SetRBNodeData(&Rowset)

Description

Use the SetRBNodeData method to specify the level 1 component rowset that is the source for the node data for the rating box chart.

If you make a change to the underlying data of a chart, call the SetRBNodeData method again to update the chart.

Parameters

&Rowset

An already instantiated and populated component rowset object that references the rating chart node record.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetRBNodeRecord

Syntax

SetRBNodeRecord(Record.RecordName)

Description

Use the SetRBNodeRecord method to specify the record that is to contain the node data for the rating box chart.

Parameters

Record.RecordName

Specify the name of the record to be used as the node record.

Returns

None.

Click to jump to top of pageClick to jump to parent topicSetXAxisLabels

Syntax

SetXAxisLabels(&Array_of_Any)

Description

Use the SetXAxisLabels method to specify an array of labels for the X axis.

Parameters

&Array_of_Any

Specify an already instantiated array of any that contain the labels that you want to use for the X Axis. The array size must match the value in the XAxisBoxNum property. If they do not match, the system throws a runtime error.

Returns

None.

See Also

Array Class

Click to jump to top of pageClick to jump to parent topicSetYAxisLabels

Syntax

SetYAxisLabels(&Array_of_Any)

Description

Use the SetYAxisLabels method to specify an array of labels for the Y axis.

Parameters

&Array_of_Any

Specify an already instantiated array of any that contain the labels that you want to use for the Y Axis. The array size must match the value in the YAxisBoxNum property. If they do not match, the system throws a runtime error.

Returns

None.

See Also

Array Class

Click to jump to parent topicRatingBoxChart Class Properties

These properties are used by the RatingBoxChart class. The properties are described in alphabetic order.

Click to jump to top of pageClick to jump to parent topicBoxMaxDisplayItems

Description

Specify how many nodes are to be shown in the displayable area of the box. When the number of nodes to be shown exceeds BoxMaxDisplayItems, a link labeled “View all (N)” appears at the bottom right of the box, where N is the total number of nodes in the box. The user can click the link to launch a pop-up that contains all the nodes. A scrollbar enables the user to scroll through all the nodes in the list.

Only one pop-up window will appear in the rating box chart, so when the user clicks another “View all (N)” link in another box, the previous pop-up window closes and the new pop-up window opens at the center of the rating box.

If an invalid (negative) value is specified, an error will be thrown at runtime.

The default value is 1.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicDraggedNodeStyle

Description

Use this property to specify the style class that controls the appearance of a node as it is being dragged.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_RATBOX_DRAGGED_NODE.

This property is read-write.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicGridLineType

Description

Use this property to specify the style of the grid lines.

The default value is %ChartLine_Solid. The possible values are:

Value

Description

%ChartLine_Solid

Draw grid lines with solid lines.

%ChartLine_Dash

Draw grid lines with lines composed of dashes.

%ChartLine_Dot

Draw grid lines with lines composed of dots.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicHasLegend

Description

Use this property to specify if a legend appears with the chart. This property takes a Boolean value: True if the legend appears with the chart, and False otherwise.

The default value is False.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicHeight

Description

Use this property to specify the height of the chart. This property takes a numeric value. The unit of measurement is pixels.

The default value is the height of the chart control on the page definition.

If you set a chart height value that cannot fit the X axis and label areas of the chart, a runtime error is thrown and the chart is not rendered.

If you set a negative value, a runtime error is thrown and the chart is not rendered.

If you try to read this property before setting it, the value returned is 0.

This property is read-write.

See Also

Chart class: Height property.

Click to jump to top of pageClick to jump to parent topicIconOnlySelectedQuadrantStyle

Description

Use this property to specify the style class that controls the appearance of border properties of the selected quadrant of an icon-only rating box chart when the system displays the view all pop-up.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default is PT_RATBOX_ICONONLY_BOX.

This property is read-write.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicIsDragable

Description

Specify whether the node in the rating box can be dragged and dropped. If the property is specified as True, then user will be able to drag the node in the rating box and drop it to another quadrant. If the property is False, then the drag and drop action is disabled.

The default value is True.

This property is read-write.

See Also

Chart class: Height property.

Click to jump to top of pageClick to jump to parent topicLegendPosition

Description

Use this property to specify where the legend should appear in relationship to the chart. You can specify either a numeric or constant value for this property.

The values are:

Numeric Value

Constant Value

Description

2

%ChartLegend_Top

Display legend at the top of the chart.

3

%ChartLegend_Bottom

Display legend below the chart.

If you set a value other than 2 or 3, a runtime error is thrown and the chart is not rendered.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicMainTitle

Description

Use this property to specify the text for the main title of the chart.

This property takes a string value.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicMainTitleStyle

Description

Use this property to specify the style of the main title. The values for this property are the style classes contained in the style sheet associated with the chart.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_RATBOX_TITLE.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicNDMaxDisplayDescLength

Description

Specify the maximum number of characters that will display for the description.

When the ShowNodeDescription chart property is set to True, then both the icon and the description of the node will appear in the quadrant.

If the description is larger than NDMaxDisplayDescLength then the node displays the number of characters specified in NDMaxDisplayDescLength, followed by an ellipsis.

If the full node description or the number of characters specified in NDMaxDisplayDescLength cannot fit in a box at runtime the description is automatically truncated. An ellipsis (...) follows the truncated text.

You only need to set this property if you want the truncated text to be less than the automatically truncated text.

When the user mouses over the truncated node description, the whole text displays in a tool tip.

If an invalid (negative) value is specified, an error will be thrown at runtime.

The default value is 50.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicPopUpHeaderStyle

Description

Use this property to specify the style class that controls the appearance of the pop-up header.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_RATBOX_POPUP_HEADER.

This property is read-write.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicPopUpHeight

Description

Specify the height of the pop-up chart in pixels.

This parameter takes a number value.

The recommended value is half of the rating box chart height.

If you set a pop-up chart height value that cannot fit the X axis area of the popup chart, a runtime error is thrown.

The default value is 0. If a negative value is specified, an error will be thrown at runtime.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicPopUpStyle

Description

Use this property to specify the style class that controls the appearance of the pop-up.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_RATBOX_POPUP.

This property is read-write.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicPopUpWidth

Description

Specify the width of the pop-up chart in pixels.

This parameter takes a number value.

The recommended value is half of the rating box chart width.

If you set a pop-up chart width value that cannot fit the Y axis area of the popup chart, a runtime error is thrown.

The default value is 0. If a negative value is specified, an error will be thrown at runtime.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicSelectedQuadrantStyle

Description

Use this property to specify the style class that controls the appearance of the quadrant when it is selected.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_RATBOX_SELECTED_BOX.

This property is read-write.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicShowNodeDescription

Description

Specify whether the chart should show the node description. This property takes a Boolean value.

Value

Description

True

Both the icon and description for the node appear.

False

Only the icon for the node appears.

The default value is True.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicStyle

Description

Use this property to specify the overall style for the chart by specifying a style class. The value must be a valid class within the style sheet specified for the chart.

The default style class is PT_RATBOX_CHART.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicViewAllStyle

Description

Use this property to specify the style class that controls the appearance of the View All link.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_RATBOX_VIEWALL_DESCR.

This property is read-write.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicWidth

Description

Use this property to specify the width of the chart. This property takes a numeric value. The unit of measurement is pixels.

The default value is the width of the chart control on the page definition.

If you set a chart width value that cannot fit the Y axis and label areas of the chart, a runtime error is thrown.

If a negative value is specified, an error will be thrown at runtime and the chart will not be rendered.

If you try to read this property before setting it, the value returned is 0.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicXAxisBoxNum

Description

Specify the number of boxes in the X axis.

This property is required. The value must be equal to or greater than 1.

If a value less than 1 is specified, an error will be thrown at runtime.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicXAxisLabelStyle

Description

Use this property to specify the style of the X-axis label. The values for this property are the style classes contained in the style sheet associated with the chart.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_RATBOX_XAXIS.

This property is read-write.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicXAxisTitle

Description

Use this property to specify the text for the X-axis title.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicXAxisTitleStyle

Description

Use this property to specify the style of the X-axis title. The values for this property are the style classes contained in the style sheet associated with the chart.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_RATBOX_XTTL.

This property is read-write.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicYAxisBoxNum

Description

Specify the number of boxes in the Y axis.

This property is required. The value must be equal to or greater than 1.

If a value less than 1 is specified, an error will be thrown at runtime.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicYAxisLabelStyle

Description

Use this property to specify the style of the Y-axis label. The values for this property are the style classes contained in the style sheet associated with the chart.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_RATBOX_YAXS.

This property is read-write.

See Also

Style Sheets.

Click to jump to top of pageClick to jump to parent topicYAxisTitle

Description

Use this property to specify text of the title for the Y axis.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicYAxisTitleStyle

Description

Use this property to specify the style of the Y-axis title. The values for this property are the style classes contained in the style sheet associated with the chart.

The values for this property are controlled by the specified style class in the style sheet associated with the chart.

The default style class is PT_RATBOX_YTITL.

This property is read-write.

See Also

Style Sheets.

Click to jump to parent topicCharting Examples

The following are some example of charts, with the PeopleCode used to create them.

Click to jump to top of pageClick to jump to parent topicCreating a Chart Using the Chart Class

This section demonstrates how to create a simple chart based on the Chart class. This chart is meant to be used to demonstrate basic principles of creating charts and give an opportunity to experiment with different chart types. It is not typical of how a chart is used in PeopleSoft applications.

The first six steps also apply to creating charts using the Gantt class, the OrgChart class, and the RatingBoxChart class.

The steps to create a chart are:

  1. Place a chart control on a page.

  2. Associate the chart control with a record field.

  3. Create the chart data record.

  4. Add PeopleCode to instantiate a chart object.

  5. Set the data source.

  6. View the page in the browser.

  7. Add data for the chart.

  8. Specify the series data.

  9. Specify chart colors.

  10. Add text elements.

  11. Review the complete program.

Placing a Chart Control on a Page

In Application Designer, create a new page.

Select Insert, Chart and draw a rectangle to represent the area the chart will occupy. The chart can be any size, and you can have more than one chart on a page.

Place the page on a component and register the component.

Associating the Chart Control with a Record Field

Each chart on a component must be associated with a unique field. Double-click the chart control to access the Chart Properties and enter a record name and field name.

The chart field has no special requirements. Its only purpose is to provide a reference to the field in PeopleCode.

This sample chart uses a derived/work record named SC_CHART_DUMREC that is dedicated to this purpose.

Creating the Chart Data Record

The chart needs either a record or a rowset to serve as the data source. This sample chart uses a record. See the Chart class SetData method for details about using a rowset.

See Chart class: SetData method.

At a minimum, the record must have fields for the X-axis data and the Y-axis data. Optionally, the record can have fields for series data, chart color, and glyph size.

The record must be available in the component buffer at runtime. You can use a database record that is already part of your application or you can use a derived/work record or a component rowset that you populate at runtime. For greatest control, you will normally populate your record or rowset at runtime.

For the sample chart, place the record on a grid on a second page on the sample component. This placement gives you the opportunity to experiment with the data.

Your chart data record must be placed at level 1 on the same component as the chart so that the data is available in the component buffer at runtime. In your application, you can hide the grids or scroll areas that hold the records. For the sample chart, you will keep the grid visible so you can enter sample data.

Adding PeopleCode to Instantiate a Chart Object

This example instantiates a chart object using the Chart class, so it can be used to create bar charts, line charts, pie charts, and so on. Other examples in this section demonstrate how to create charts based on the Gantt class, OrgChart class, and RatingBoxChart class.

See Creating a Gantt Chart, Creating an Organization Chart, Creating a Rating Box Chart.

Add this PeopleCode to the Activate event on the page:

/* Declare and instantiate a chart object */ Component Chart &cChart; &cChart = GetChart(SC_CHART_DUMREC.SC_CHART_FIELD);

Chart PeopleCode is commonly placed on the Activate event, but it can be placed on any appropriate event. You could, for instance, execute the chart PeopleCode from a FieldChange event associated with a push button.

Setting the Data Source

The SetData method takes either a record or a rowset as an argument. In general, specify a record or component rowset when building a chart from page data and a standalone rowset when building a chart using an iScript.

In this example, the PeopleCode sets Product as the series data and sets Region to the X axis, so that in a bar chart products will be grouped along the X axis by region. In a line chart, each series is represented by a line. Sales figures are charted on the Y axis.

Note. SetData, SetDataXAxis, and SetDataYAxis are Chart class methods. The other charting classes provide equivalent methods to specify data sources.

/* Set the chart data record and specify X-axis, Y-axis, and series data */ &cChart.SetData(Record.SC_CHART_RECORD); &cChart.SetDataXAxis(SC_CHART_RECORD.SC_REGION); &cChart.SetDataYAxis(SC_CHART_RECORD.SC_SALES);

See Chart class: SetData method, SetDataSeries method, SetDataXAxis method, SetDataYAxis method, Creating a Chart Using an iScript .

Viewing the Page in the Browser

This is the most basic PeopleSoft Chart class chart. It has no data and only the default Y axis.

Adding Data for the Chart

Add the following data to the chart:

Region

Sales

Arizona

60

California

50

Oregon

42

Washington

30

This bar chart is generated by the example code and data:

This chart graphs sales on the Y axis (the vertical axis) and regions on the X axis (the horizontal axis).

When the data for the chart is grouped according to values, a set of data representing a single value is called a series. For instance, if a chart shows sales for different products in each region, then the set of data for each product is a series.

At this point, the chart has only one series, so you do not need to set the series record field.

Specify the Series Data

If you want to graph more than one product on your chart, you need to specify the source of the series data.

For example, add the products shown in this table to your data:

Product

Region

Sales

Footballs

Arizona

60

Rackets

Arizona

50

Shoes

Arizona

42

Tents

Arizona

35

Footballs

California

55

Rackets

California

46

Shoes

California

30

Tents

California

35

Footballs

Oregon

50

Rackets

Oregon

40

Shoes

Oregon

30

Tents

Oregon

25

Footballs

Washington

45

Rackets

Washington

30

Shoes

Washington

20

Tents

Washington

15

Add this PeopleCode to set the series record field:

&cChart.SetDataSeries(SC_CHART_RECORD.SC_PRODUCT);

The resulting chart is a default 2D bar chart with bars for each region grouped by series:

The chart has four series:

Each series shows four regions along the X axis:

Sales values appear against the Y axis as bar height.

The chart uses the default colors.

Specifying Chart Colors

If you do not want to use the default colors, you need a column containing the colors for each bar. Typically, the bars in a series are colored alike.

Product

Region

Sales

Chart Color

Footballs

Arizona

60

1

Rackets

Arizona

50

13

Shoes

Arizona

42

5

Tents

Arizona

35

15

Footballs

California

55

1

Rackets

California

46

13

Shoes

California

30

5

Tents

California

35

15

Footballs

Oregon

50

1

Rackets

Oregon

40

13

Shoes

Oregon

30

5

Tents

Oregon

25

15

Footballs

Washington

45

1

Rackets

Washington

30

13

Shoes

Washington

20

5

Tents

Washington

15

15

Add the following PeopleCode to your program to set the colors for your chart:

/* Associate color field with chart */ &cChart.SetDataColor(SC_CHART_RECORD.QE_CHART_COLOR);

Adding Text Elements

The following PeopleCode adds these elements to your chart:

/* Set title and legend properties */ &cChart.MainTitle = "Recreational Product Sales by Region"; &cChart.HasLegend = True; &cChart.LegendPosition = %ChartLegend_Right; /* Set axis text properties */ &cChart.XAxisLabelOrient = %ChartText_Horizontal; &cChart.XAxisTitle = "Region"; &cChart.YAxisTitle = "Sales";

This is the resulting chart:

Reviewing the Complete Program

The PeopleCode for this bar chart has been presented in snippets. Here is the complete program that produced the chart:

/* Declare a chart object */ Component Chart &cChart; /* Instantiate the chart object and associate the chart ** with the chart page control */ &cChart = GetChart(SC_CHART_DUMREC.QE_CHART_FIELD); /* Set the chart data record and specify X-axis, Y-axis, ** and series data */ &cChart.SetData(Record.SC_CHART_RECORD); &cChart.SetDataSeries(SC_CHART_RECORD.SC_PRODUCT); &cChart.SetDataXAxis(SC_CHART_RECORD.SC_REGION); &cChart.SetDataYAxis(SC_CHART_RECORD.SC_SALES); /* Associate color field with chart */ &cChart.SetDataColor(SC_CHART_RECORD.QE_CHART_COLOR); /* Set title and legend properties */ &cChart.MainTitle = "Recreational Product Sales by Region"; &cChart.HasLegend = True; &cChart.LegendPosition = %ChartLegend_Right; /* Set axis text properties */ &cChart.XAxisLabelOrient = %ChartText_Horizontal; &cChart.XAxisTitle = "Region"; &cChart.YAxisTitle = "Sales ";

Other Modifications

The remainder of this section shows the effects of modifying other aspects of your chart.

Changing X-Axis and Series Values

To group sales by product instead of by region, switch the series and the X axis. You will also need to reorder colors to correspond to regions instead of products.

&cChart.SetDataSeries(SC_CHART_RECORD.SC_REGION); &cChart.SetDataXAxis(SC_CHART_RECORD.SC_PRODUCT ); &cChart.XAxisTitle = "Region"; &cChart.MainTitle = "Recreational Product Sales by Product";

Axis Properties

If your chart has negative values, the bars automatically extend below the X axis:

If you want to remove the tick marks from the X or Y axis, you need to specify an empty array for the SetXAxisLabels or SetYAxisLabels methods.

The following example removes the tick marks from the Y axis:

&Arr = CreateArray(""); &Chart.SetYAxisLabel(&Arr);

If you set the X-axis labels to an empty array to remove the ticks, you must be plotting a single series on the chart because labels are automatically generated for each series if you do not provide them.

See Chart class: SetXAxisLabels method, SetYAxisLabels method.

You can also use the XAxisCross, XAxisMin, XAxisMax, YAxisMin, YAxisMax, and other axis properties to control the appearance of the axes.

See Chart class: XAxisCross property, XAxisLabelOrient property, XAxisStyle property, XAxisTicks property, YAxisLabelOrient property, YAxisMax property, YAxisMin property, YAxisStyle property, YAxisTicks property.

Chart Class Chart Types

Use the Type property to set the chart type.

2D Bar Chart

The default Chart class chart type is a bar chart.

&cChart.Type=%ChartType_2DBar;

The following examples show the various chart types using the same data. Each example gives the PeopleCode snippet that creates that chart type.

For a complete list of all Chart class chart types, see Chart class Type property.

See Chart class: Type property.

The Charting Examples section provides other examples of PeopleCode for charts using Gantt class, OrgChart class, and RatingBoxChart class at the end of the chapter.

See Creating a Gantt Chart, Creating an Organization Chart, Creating a Rating Box Chart.

3D Bar Chart

A visual 3D effect can add interest to a chart.

Add this code to make your bar chart a 3D bar chart:

&cChart.Type = %ChartType_3DBar; &cChart.XAxisLabelOrient = 90;

This PeopleCode also turns the X-axis labels 90 degrees for better readability. Valid values for XAxisLabelOrient are 0 and 90.

Use the XRotationAngle, YRotationAngle, and ZRotationAngle properties to rotate the bar chart. This example shows the default values for rotation.

The default values are:

Property

Value

XRotationAngle

330

YRotationAngle

345

ZRotationAngle

0

The following 3D bar chart uses these rotation angles:

&cChart.XRotationAngle = "340"; &cChart.YRotationAngle = "10"; &cChart.ZRotationAngle = "10";

See Chart class: XRotationAngle property, YRotationAngle property, ZRotationAngle property, XAxisLabelOrient property.

Horizontal Bar Chart

Use this line of code to specify a horizontal bar chart:

&cChart.Type = %ChartType_2DHorizBar;

Stacked Bar Chart

With a the stacked bar chart, you can place a different emphasis on the same data. The stacked column shows total sales per region as well as the product segments that contribute to the total.

Use this line of code to specify a stacked bar chart:

&cChart.Type = %ChartType_2DStackedBar;

3D Stacked Bar Chart

Use this line of code to specify a 3D stacked bar chart:

&cChart.Type = %ChartType_3DStackedBar;

Horizontal Stacked Bar Chart

Use this line of code to specify a horizontal stacked bar chart:

&cChart.Type = %ChartType_2DHorizStackedBar;

Percent Bar Chart

A percent bar is similar to a stacked bar, but the segments of each bar add up to 100. The segments show the proportional contribution of each product to total sales.

Use this line of code to specify a horizontal stacked bar chart:

&cChart.Type = %ChartType_2DPercentBar;

3D Percent Bar Chart

Use this line of code to specify a horizontal stacked bar chart:

&cChart.Type = %ChartType_3DPercentBar;

Horizontal Percent Bar Chart

Use this line of code to specify a horizontal stacked bar chart:

&cChart.Type = %ChartType_2DHorizPercentBar;

Line Chart

A line chart is useful for showing changes and trends over time or across categories.

Use this line of code to specify a horizontal stacked bar chart:

&cChart.Type = %ChartType_2DLine;

Overlay Chart

You can overlay one chart on top of another to compare two different but related sets of data. The following chart uses a second set of data, showing average temperature for each region.

Use the OLType property to specify whether the overlay is a line chart or a histogram.

Add this PeopleCode to the PeopleCode for your bar chart to create 2D line chart overlay:

/* Create OL chart */ &cChart.SetOLData(Record.SC_OLCHART_REC); &cChart.SetOLDataSeries(SC_OLCHART_REC.SC_CHART_SERIES); &cChart.SetOLDataXAxis(SC_OLCHART_REC.SC_CHART_XAXISDATA); &cChart.SetOLDataYAxis(SC_OLCHART_REC.SC_YAXISDATA); &cChart.OLType = %ChartType_2DLine;

True XY Line Chart

Use the IsTrueXY property to create a true XY line chart.

A true XY chart has a numeric X axis. That is, the numeric XY pairs can be plotted correctly.

By default, IsTrueXY is False. A default line chart plots X-axis values as discrete labels, ordered by record position.

For example, you have the following data:

X Axis

Y Axis

11

88000

12.2

96200

4.6

101300

6.6

83000

14

111200

8.5

11800

The following example shows a default line chart using the previous data:

A line chart with IsTrueXY = True orders the X-axis values numerically on a continuous scale.

The following chart is a true XY line chart plotted with the same data.

Scatter Chart

Use this line of code to specify a scatter chart:

&cChart.Type = %ChartType_2DHorizStackedBar;

A scatter chart compares number pairs. Each pair is plotted against the horizontal X axis and the vertical Y axis. The data values are scattered across the chart. XY scatter charts are good for showing comparisons of numbers, such as scientific or statistical data, where several measurements need to be plotted on a single chart.

A scatter chart is a true XY chart, meaning that the X axis is numeric. The IsTrueXY property is automatically set to True.

For example, this sample data could be used to make an XY scatter chart:

Tenure

Salary

11

88000

12.2

96200

4.6

101300

6.6

83000

14

111200

8.5

11800

You use this code snippet to make a scatter chart:

&cChart.SetDataXAxis(SC_CHART_RECORD.SC_REGION); &cChart.SetDataYAxis(SC_CHART_RECORD.SC_SALES); &cChart.Type = %ChartType_2DScatter;

You can set the color for each point, or glyph, on a scatter chart, and you can make each point drillable.

Note. If you have only one point of data, that is, only one X and Y pair, use a scatter chart. You may have unexpected results if you use a line chart with only one point.

Bubble Chart

A bubble chart is a special type of scatter chart.

If you add a third data set, glyph size, to a scatter chart, you can create a bubble chart, which uses the size of the markers to represent a third dimension of numeric data.

You can also set annotations for scatter charts and bubble charts.

This chart example uses Age to determine the size of the bubble markers, or glyphs, on the chart and Name to set the annotations:

Tenure

Salary

Age

Name

11

88000

39

Dickens

12.2

96200

55

Tolstoy

4.6

101300

32

Hemingway

6.6

83000

48

Tolkien

14

111200

59

Joyce

8.5

11800

49

Shelley

&cChart.SetDataAnnotations(SC_CHART_RECORD.SC_NAME); &cChart.SetDataGlyphScale(SC_CHART_RECORD.SC_AGE); &cChart.Type = %ChartType_2DScatter;

Pie Chart

A pie chart shows comparisons within a single set of values, and it shows how parts contribute to a whole. It is an ideal chart type to display the contribution of each region to an annual sales total.

A pie chart ignores the series and only plots X-axis data against Y-axis values. Our original bar chart has four regions times four products, resulting in 16 XY pairs. A pie chart with all of those slices would be confusing and not helpful. Instead, suppose you want to show just the data for tents, which are in rows 13–16. You can use a combination of the DataWidth and DataStartRow properties to select which rows to display.

You can make a pie chart showing only rows 13–16 by adding this snippet of code:

&cChart.DataWidth = 4; &cChart.DataStartRow = 13; &cChart.Type = %ChartType_2DPie;

3D Pie Chart

Use this line of code to specify a horizontal stacked bar chart:

&cChart.Type = %ChartType_3DPie;

Tick Mark Considerations

If you want to remove the tick marks from the X or Y axis, you need to specify an empty array for the SetXAxisLabels or SetYAxisLabels methods.

The following example removes the tick marks from the Y axis:

&Arr = CreateArray(""); &Chart.SetYAxisLabel(&Arr);

If you set the X-axis labels to an empty array to remove the ticks, you must be plotting a single series on the chart because labels are automatically generated for each series if you do not provide them.

See Chart class: SetXAxisLabels method, SetYAxisLabels method.

Adding Drilldown

If you set the property IsDrillable to True and add FieldChange PeopleCode to your chart, your user can get more information by clicking a chart data element—a bar, line segment, data point, or pie slice.

For a simple example, add this PeopleCode to the FieldChange event on the Y-axis field:

MessageBox(0, "", 0, 0, " Sales for " | SC_CHART_RECORD.SC_PRODUCT | " in " | SC_CHART_RECORD.SC_REGION | " = " | SC_CHART_RECORD.SC_SALES);

And add this code to the page Activate event for your pie chart:

&cChart.IsDrillable = True;

When the user clicks the Oregon slice of the pie chart, this message appears:

Current context provides the values for fields in the current row in the component buffer. You can use drilldown with your chart data fields along with any other data in the component buffer to accomplish anything FieldChange PeopleCode is capable of.

If the bars on a bar chart are too narrow, a user may not be able to click them. Sometimes, a few bars on a chart are affected, sometimes all of the bars cannot be clicked. The workaround is to put fewer bars on your chart or to make your chart bigger so that each bar is wider.

See Chart class: IsDrillable property.

Using the Other Charting Classes

In addition to the all the charts you can create with the Chart class, you can create specialized charts using the Gantt class, the OrgChart class, and the RatingBoxChart class.

You follow the same initial steps to create these specialized charts as you do for the Chart class chart types. The PeopleCode programs to set the data and properties are similar as well, but Gantt charts, organization charts, and rating box charts use data differently and interact with the user in different ways than do the Chart class charts.

See Creating a Gantt Chart, Creating an Organization Chart, Creating a Rating Box Chart.

Click to jump to top of pageClick to jump to parent topicCreating a Gantt Chart

The PeopleCode and data used in this example create the following Gantt chart:

This example uses the following data in the record QE_GANTT_TASK:

The chart also uses the following dependency data in the record QE_GANTT_TASKD:

To create a Gantt chart:

  1. In Application Designer, add a chart control to a page and associate the chart control with a record name and a field name.

    See Creating a Chart Using the Chart Class.

  2. Initialize a Gantt chart object.

    Initialize the chart using the GetGanttChart function. The arguments of the function are the record and field name specified for the chart definition in Application Designer.

    Local Gantt &gGantt; &gGantt = GetGanttChart(QE_CHART_DUMREC.QE_CHART_FIELD);

  3. Specify values for the required methods.

    At a minimum, specify the source of the task data and which fields contain task ID, start date, and end date.

    &gGantt.SetTaskData(Record.QE_GANTT_TASK); &gGantt.SetTaskID(QE_GANTT_TASK.QE_TASK_ID); &gGantt.SetPlannedStartDate(QE_GANTT_TASK.QE_PLANNED_START); &gGantt.SetPlannedEndDate(QE_GANTT_TASK.QE_PLANNED_END);

  4. Specify values for the additional methods controlling the appearance of the data.

    After setting the required methods, you can set additional methods to control the appearance of the chart. The following code specifies the amount that the scroll bars scroll when clicked, the percentage of the entire chart that is taken up by the chart area, the width and height of the chart, on what row the chart should begin displaying data, the width of the data, if the user can click the chart area of the Gantt chart and either execute a function or a URL, and whether labels should appear with the tasks in the task section.

    &gGantt.SetTableXScrollbar(0.20); &gGantt.SetChartArea(50); &gGantt.Width = 700; &gGantt.Height = 380; &gGantt.DataStartRow = 1; &gGantt.DataWidth = 11; &gGantt.IsDrillable = True; &gGantt.ShowTaskLabels = True;

  5. Specify the appearance of grid lines.

    Depending on the type of data that you are using, you can specify the type of grid lines that should appear in the chart section of the Gantt chart.

    &gGantt.GridLineType = %ChartLine_Solid; &gGantt.GridLines = %ChartGrid_Vertical;

  6. Specify the appearance of data.

    The following methods control the appearance of the different parts of the task data, such as the label, which hints appear when you pass the mouse over the task data, and so on.

    &gGantt.SetTaskName(QE_GANTT_TASK.QE_TASK_NAME); &gGantt.SetWBSNumbering(QE_GANTT_TASK.QE_HINTS); &gGantt.SetTaskLevel(QE_GANTT_TASK.QE_LEVEL); &gGantt.SetTaskLabel(QE_GANTT_TASK.QE_TASK_LABEL); &gGantt.SetTaskProgress(QE_GANTT_TASK.QE_TASK_PROGRESS); &gGantt.SetTaskHints(QE_GANTT_TASK.QE_HINTS); &gGantt.SetTaskBarURL(QE_GANTT_TASK.QE_URL); &gGantt.SetTaskMilestone(QE_GANTT_TASK.QE_TASK_MILESTONE); &gGantt.TaskMilestoneGlyph = QE_GANTT_PROJ.QE_MILESTONE_GLYPH; &gGantt.SetTaskExpanded(QE_GANTT_TASK.QE_EXPANDED); &gGantt.SetPlannedTaskBarColor(QE_GANTT_TASK.QE_PLANNED_COLOR); &gGantt.SetActualTaskBarColor(QE_GANTT_TASK.QE_ACTUAL_COLOR); &gGantt.SetTaskProgressBarColor(QE_GANTT_TASK.QE_PROGRESS_COLOR);

  7. Specify the additional fields that will appear in the table section.

    You can also specify application data that will appear with the task data.

    &gGantt.SetTaskAppData(QE_GANTT_TASK.QE_PLANNED_START, QE_GANTT_TASK.QE_PLANNED_END, QE_GANTT_TASK.QE_TASK_PROGRESS, QE_GANTT_TASK.QE_TASK_NAME, QE_GANTT_TASK.QE_EXPANDED);

  8. Specify titles for the task bars.

    &gGantt.TaskTitle = "Tasks"; &appDataArray = CreateArray("Start", "End", "Progress", "Name", "Expanded"); &gGantt.SetTaskAppDataTitles(&appDataArray);

  9. Specify the fields for task dependency data.

    You do not need to specify dependency data. However, if you do, you must also specify the parent ID and the child ID (where the dependency data starts and ends). You can also specify the type of line used between dependencies and a URL that the browser will open to if the user clicks a dependency line.

    &gGantt.SetTaskDepenencyData(Record.QE_GANTT_TASKD); &gGantt.SetTaskDependencyParentID(QE_GANTT_TASKD.QE_PARENT_TASK_ID); &gGantt.SetTaskDependencyChildID(QE_GANTT_TASKD.QE_TASK_ID); &gGantt.TaskDependencyLineType = %ChartLine_Solid; &gGantt.SetTaskDependencyURL(QE_GANTT_TASKD.URL);

  10. Specify the actual dates for the project.

    If you know the actual start and end dates, in addition to the planned date, you can add those to your chart.

    &gGantt.SetActualStartDate(QE_GANTT_TASK.QE_ACTUAL_START); &gGantt.SetActualEndDate(QE_GANTT_TASK.QE_ACTUAL_END);

  11. Specify the DateTime axis values.

    You can specify values for where the DateTime axis starts and ends.

    &gGantt.AxisStartDateTime = DateTimeValue("01/01/1963 8:00:00"); &gGantt.AxisEndDateTime = DateTimeValue("01/01/1987 8:00:00");

  12. Specify the format of the DateTime axis values.

    You can specify the format of the DateTime elements, such as the appearance of the days of the week, whether as a number or using the full name, and so on.

    &gGantt.SetMonthFormat(%Chart_MonthFormat_FullName); &gGantt.SetDayFormat(%Chart_DayFormat_2Digit);

Click to jump to top of pageClick to jump to parent topicCreating an Organization Chart

The PeopleCode used in this example creates the following organization chart:

To create an organization chart:

  1. Add a chart control to a page in PeopleSoft Application Designer.

    Associate the chart control with a record name and field name.

    See Creating a Chart Using the Chart Class.

  2. Add the organization node record and the pop-up node record to the component.

    These records are derived/work records that contain clones of the subrecords PTORGNODE_SBR and PTPOPUPNODE_SBR. These records must be in the component buffer. You can add them to a hidden grid on the page, or you can place them on another page in the same component.

  3. If the chart will have breadcrumbs, add the breadcrumb node record to the component.

    This derived/work record contains a clone of the subrecord PTORGCRMB_SBR. The record must be in the component buffer.

  4. Prepare the organization chart data.

    In an event such as PreBuild, instantiate two rowset objects and populate them with the organization node data and the pop-up node data.

    This example shows one possible way. How you do it depends on how your data is stored and how you intend to present it.

    Component Rowset &rs, &rsP, &rsBC, &rsOrgNode, &rsOrgPopupND, &rsBreadCrumbs; Component OrgChart &ocOrgChart; Local Rowset &RSGridDR; Local Rowset &RSAGRID; /* The record QE_ORG_NODEDATA has the data for the org chart ** ** You will probably fill the rowset with some subset of the data** ** in the database. This example uses all the rows. */ &rs = CreateRowset(Record.QE_ORG_NODEDATA); &rs.Fill(); /* Get the grid on the page for the node data and initalize to nulls */ & rsOrgNode = GetLevel0()(1).GetRowset(Scroll.QE_ORG_NODE); & rsOrgNode.Flush(); /* Copy data from database table, QE_ORG_NODEDATA to the derived/work ** record QE_ORG_NODE_DR */ &rs.CopyTo(&rsOrgNode, Record.QE_ORG_NODEDATA, Record.QE_ORG_NODE_DR); /* The record QE_ORG_POPDATA has the data for the popup chart */ &rsP = CreateRowset(Record.QE_ORG_POPDATA); &rsP.Fill(); /* Get the grid on the page for the popup data and initalize to nulls */ & rsOrgPopupND = GetLevel0()(1).GetRowset(Scroll.QE_ORG_POPUP); & rsOrgPopupND.Flush(); /* Copy data from database table, QE_ORG_POPDATA to the derived/work ** record QE_ORG_POP_DR */ &rsP.CopyTo(&rsOrgPopupND, Record.QE_ORG_POPDATA, Record.QE_ORG_POP_DR); /* Fill in the breadcrumb information for this chart if the chart ** ** uses breadcrumbs. */ &rsBC = CreateRowset(Record.QE_ORG_CRMB); &rsBC.Fill(); /* Get the grid on the page for the pop data and initalize to nulls */ &rsBreadCrumbs = GetLevel0()(1).GetRowset(Scroll.QE_ORG_BCRMB); &rsBreadCrumbs.Flush(); /* Copy data from database table, QE_ORG_CRMB to the derived/work ** record QE_ORG_CRMB_DR */ &rsBC.CopyTo(&rsBreadCrumbs, Record.QE_ORG_CRMB, Record.QE_ORG_CRMB_DR);

  5. Instantiate an OrgChart object.

    In an event such as Activate, add PeopleCode to instantiate and define your organization chart.

    Get the chart using the GetOrgChart function. The argument for this function is the record name and field name specified on the Records tab of the Chart Properties dialog box in Application Designer.

    Component Rowset & rsOrgNode, & rsOrgPopupND, &rsBreadCrumbs; Component OrgChart &ocOrgChart; &ocOrgChart= GetOrgChart(QE_CHART_DUMREC.QE_CHART_FIELD);

  6. Specify the organization node record and the pop-up node record.

    These records contain the clones of the subrecords PTORGNODE_SBR and PTORGPOPUP_SBR, respectively.

    &ocOrgChart.SetNodeRecord (Record.QE_ORG_NODE_DR); &ocOrgChart.SetPopUpNodeRecord (Record.QE_ORG_POP_DR);

  7. Specify the node data and pop-up node data rowset objects.

    /*&RSORGND and &RSORGPOPUPND are level 1 component rowsets that contain the ** organization node data and pop-up node data respectively.*/ &ocOrgChart.SetNodeData (&rsOrgNode); &ocOrgChart.SetPopUpNodeData (&RSORGPOPUPND);

  8. (Optional) Specify values for the chart display properties.

    &ocOrgChart.MainTitle = "Application Development"; &ocOrgChart.MainTitleStyle = "PT_ORGCHART_TITLE"; &ocOrgChart.Direction = 2; &ocOrgChart.Height = 380; &ocOrgChart.Width = 700; &ocOrgChart.VerticalSpace = 15; &ocOrgChart.ImageLocation = 1; &ocOrgChart.Style= "PTORGCHART"; &ocOrgChart.HasLegend = True; &ocOrgChart.NodeMaxDisplayDescLength =30; &ocOrgChart.CollapsedImage ="PT_COLLAPSED_CHART"; &ocOrgChart.ExpandedImage ="PT_EXPANDED_CHART"; &Expanded_Msg=MsgGetText(110, 100); &Collapsed_Msg=MsgGetText(110, 101); &ocOrgChart.Expanded_Msg =&Expanded_Msg &ocOrgChart.Collapsed_Msg =&Collapsed_Msg

  9. Specify values for the legend. This is required only if the chart has a legend.

    &ocOrgChart.LegendStyle = PT_ORGCHART_LEGEND; &LegendArray = CreateArray("Main", "1-2yrs", "3-5yrs", "Emergency", "Retirement", "Key", "Successors"); &LegendImgArray = CreateArray("QE_NOWORGCHART", "QE_12ORGCHART", "QE_34ORGCHART", "QE_EMRORGCHART", "QE_RETIRORG", "QE_KPERSON", "QE_SUCCSORGCHART"); &ocOrgChart.SetLegend(&LegendArray); &ocOrgChart.SetLegendImg(&LegendImgArray); &ocOrgChart.LegendPosition = %ChartLegend_Top; &ocOrgChart.LegendStyle = "PT_ORGCHART_LEGEND";

  10. (Optional) Specify image values.

    &ocOrgChart.ImageLocation =1; &ocOrgChart.ImageHeight =150; &ocOrgChart.ImageMouseoverMagnificationFactor =150; &ocOrgChart.DefaultImage=PT_CHART_DEFAULTIMG;

  11. Specify the breadcrumb data and the rowset and display properties. These are required only if your chart uses breadcrumbs.

    &ocOrgChart.SetCrumbRecord(Record.QE_ORG_CRMB_DR); &ocOrgChart.SetCrumbData(&rsBreadCrumbs); &ocOrgChart.CrumbMaxDisplayLength = 24; &ocOrgChart.CrumbSeparatorImage = "PT_ORG_BRCRM_SEP"; &ocOrgChart.CrumbDescrStyle = "PT_ORGCHART_BRDCRM";

  12. (Optional) Specify the maximum number of nodes that will appear in the pop-up without a vertical scroll bar.

    &ocOrgChart.MaxPopUpDisplayNode = 2;

  13. (Optional) Assign style class names to control the styles of each node descriptor.

    If you do not specify a style class name, then the PeopleTools default style class is used.

    This example uses the default style class names, so this segment of code could be omitted. It is shown for demonstration purposes only.

    &ocOrgChart.NodeDescr1Style = "PT_ORGNODE_DESC1"; &ocOrgChart.NodeDescr2Style = "PT_ORGNODE_DESC2"; &ocOrgChart.NodeDescr3Style = "PT_ORGNODE_DESC3"; &ocOrgChart.NodeDescr4Style = "PT_ORGNODE_DESC4"; &ocOrgChart.NodeDescr5Style = "PT_ORGNODE_DESC5"; &ocOrgChart.NodeDescr6Style = "PT_ORGNODE_DESC6"; &ocOrgChart.NodeDescr7Style = "PT_ORGNODE_DESC7";

  14. (Optional) Assign style class names to control the styles of each pop-up node descriptor.

    If you do not specify a style class name, then the PeopleTools default style sheet is used.

    This example uses the default style class names, so this segment of code could be omitted. It is shown for demonstration purposes only.

    &ocOrgChart.PopupNodeDescr1Style = "PT_POPNODE_DESC1"; &ocOrgChart.PopupNodeDescr2Style = "PT_POPNODE_DESC2"; &ocOrgChart.PopupNodeDescr3Style = "PT_POPNODE_DESC3"; &ocOrgChart.PopupNodeDescr4Style = "PT_POPNODE_DESC4"; &ocOrgChart.PopupNodeDescr5Style = "PT_POPNODE_DESC5"; &ocOrgChart.PopupNodeDescr6Style = "PT_POPNODE_DESC6"; &ocOrgChart.PopupNodeDescr7Style = "PT_POPNODE_DESC7"; &ocOrgChart.PopupNodeDescr8Style = "PT_POPNODE_DESC8"; &ocOrgChart.PopupHeaderStyle = "PT_POPNODE_HEADER";

Click to jump to top of pageClick to jump to parent topicCreating a Rating Box Chart

The PeopleCode used in the following example creates this rating box chart:

Follow these steps to create a rating box chart.

  1. Create the rating box chart node record.

    1. Clone the PTRATINGBOX_SBR subrecord to create an application-specific subrecord.

    2. Create a new application-specific record and insert the new subrecord.

  2. Add a chart control to a page in Application Designer.

    See Creating a Chart Using the Chart Class.

  3. Add the rating box chart node record to the component.

    This record must be in the component buffer. If you do not want to give the user access to the data you can add the record to a hidden grid on the page. Alternatively, you can place it on another page in the same component.

  4. Add PeopleCode.

PeopleCode for the Rating Box Chart Example

Complete these steps to create a rating box chart:

  1. Prepare the data for the chart.

    Typically, write PeopleCode in an event such as PreBuild to populate a rowset with the data you want to display in the rating box chart.

    Component Rowset &rs, &&rsRatingBox; Component RatingBoxChart &rbRatingBoxChart; /* the record QE_RATEBOX_DATA has the data for the RATING BOX chart */ &rs = CreateRowset(Record.QE_RATEBOX_DATA); &rs.Fill("Where QE_RATEBOX_TC=:1", QE_RATEBOX_TC.QE_RATEBOX_TC.Value); /* Get the grid on the page for the node data and initalize to nulls */ &rsGrid = GetLevel0()(1).GetRowset(Scroll.QE_RATEBOX_TC); &rsGrid.Flush(); /* Copy data from database table, QE_RATEBOX_DATA, to the level 1 component rowset associated with the component derived working record QE_RATEBOX_DR */ &rs.CopyTo(&rsGrid, Record.QE_RATEBOX_DATA, Record.QE_RATEBOX_DR);

  2. Define the RatingBoxChart.

    Add PeopleCode in an event such as Activate.

    Instantiate a RatingBoxChart object using the GetRatingBoxChart built-in function to reference the page control field of the chart.

    Component Rowset &rs, &rsGrid; Component RatingBoxChart &rbRatingBoxChart; &rbRatingBoxChart = GetRatingBoxChart(QE_CHART_DUMREC.QE_CHART_FIELD);

  3. Set the required display properties for the chart.

    &rbRatingBoxChart.XaxisBoxNum = 3; &rbRatingBoxChart.YaxisBoxNum = 3; &rbRatingBoxChart.PopUpWidth = 200; &rbRatingBoxChart.PopUpHeight = 200; &XAxisArray = CreateArray("Low", "Medium", "High"); &YAxisArray = CreateArray("Low", "Medium", "High"); &rbRatingBoxChart.SetXAxisLabels(&XAxisArray); &rbRatingBoxChart.SetYAxisLabels(&YAxisArray);

  4. (Optional) Specify other values for the chart display properties.

    If you do not specify these properties, the following default value will be used:

    &rbRatingBoxChart.IsDragable = True; &rbRatingBoxChart.BoxMaxDisplayItems = 3; &rbRatingBoxChart.NDMaxDisplayDescLength = 25; &rbRatingBoxChart.ShowNodeDescription = True; &rbRatingBoxChart.GridLineType = %ChartLine_Solid; &rbRatingBoxChart.XAxisTitle = "Performance"; &rbRatingBoxChart.YAxisTitle = "Potential"; &rbRatingBoxChart.NDMaxDisplayDescLength = 15; &rbRatingBoxChart.BoxMaxDisplayItems = 5; &rbRatingBoxChart.Height = 400; &rbRatingBoxChart.Width = 400; &rbRatingBoxChart.ShowNodeDescription = true; &rbRatingBoxChart.GridLineType=%ChartLine_Solid; &rbRatingBoxChart.IsDragable = True; &rbRatingBoxChart. BoxMaxDisplayItems= 1; &rbRatingBoxChart. NDMaxDisplayDescLength = 50;

  5. (Optional) Assign style class names for the chart and X/Y Axis title and labels.

    If you do not specify a style class name, the PeopleTools default style sheet is used.

    &rbRatingBoxChart.Style = "PSCHARTDEFAULT"; &rbRatingBoxChart.XAxisTitleStyle = "PT_RATBOX_XTTL"; &rbRatingBoxChart.YAxisTitleStyle = "PT_RATBOY_YTTL"; &rbRatingBoxChart.XAxisLabelStyle = "PT_RATBOX_XAXIS"; &rbRatingBoxChart.YAxisLabelStyle = "PT_RATBOX_YAXIS";

  6. (Optional) Specify title and legend properties.

    &rbRatingBoxChart.MainTitle = "Development Division"; &rbRatingBoxChart.MainTitleStyle="PT_RATBOX_TITLE" &rbRatingBoxChart.HasLegend = True; &rbRatingBoxChart.LegendPosition = %ChartLegend_Bottom; &LegendArray = CreateArray("Architect", "Engineer", "Director", "Manager", "Senior Director", "Vice-President"); &LegendImgArray = CreateArray("PT_ACECUBE", "PT_WF_PERSON","PT_STATUS_ALERT_ICN", "PT_STATUS_ASSIGNED_ICN", "QE_SUCCSORGCHART", "QE_KPERSON"); &rbRatingBoxChart.SetLegend(&LegendArray); &rbRatingBoxChart.SetLegendImg(&LegendImgArray);

  7. Set the node data rowset and record.

    The chart refreshes when the SetRBNodeData method is called.

    /* Set the node data rowset and the node record. */ &rbRatingBoxChart.SetRBNodeData(&rsGrid); &rbRatingBoxChart.SetRBNodeRecord(Record.Record. QE_RATEBOX_DR);

  8. Add FieldChange PeopleCode on the fields PTXASISRATINGS and PTYAXISRATINGS if you want to perform other logic after the drag and drop operation.

    This example shows a call to the SetRBNodeData function to redraw the chart the user changes the values in either of these two fields in the component:

    /* FieldChange PeopleCode for fields PTXAXISRATINGS and PTYAXISRATINGS*/ &rbRatingBoxChart.SetRBNodeData(&rsGrid);

Click to jump to top of pageClick to jump to parent topicCreating a Chart Using an iScript

You can also create a Chart class chart or a Gantt class chart using an iScript. The following example creates a chart, populates it, and then sends the chart URL to a response object. The complete code sample is shown.

Note. You cannot create a chart from OrgChart or RatingBoxChart using an iScript.

Function IScript_GetChartURL() Local Chart &cChart; Local Rowset &rsRowset; Local string &sMap; Local string &sURL; &cChart = CreateObject("Chart"); &rsRowset = CreateRowset(Record.QE_CHART_RECORD); &rsRowset.Fill("where QE_CHART_REGION= :1", "MIDWEST"); &cChart.SetData(&rsRowset); &cChart.Width = 400; &cChart.Height = 300; &cChart.SetDataYAxis(QE_CHART_RECORD.QE_CHART_SALES); &cChart.SetDataXAxis(QE_CHART_RECORD.QE_CHART_PRODUCT); &cChart.SetDataSeries(QE_CHART_RECORD.QE_CHART_REGION); &cChart.HasLegend = True; &cChart.LegendPosition = %ChartLegend_Right; &sURL = %Response.GetChartURL(&cChart); &sMap = &cChart.ImageMap; %Response.Write("<HTML><IMG SRC="); %Response.Write(&sURL); %Response.Write(" USEMAP=#THEMAP></IMG><MAP NAME=THEMAP>"); %Response.Write(&sMap); %Response.Write("</MAP></HTML>"); End-Function;

See CreateObject.

Complete these steps to create a chart using an iScript:

  1. Create the chart object.

    For this example, no chart control is available on a page to be referenced. To create the chart object, use the CreateObject function. The string passed in to the function must be the name of the class you are instantiating. For instance, to instantiate a chart from the Chart class, pass the string “Chart”.

    &cChart = CreateObject("Chart");

  2. Create a rowset for the chart data and set the chart data.

    The CreateRowset function creates a standalone rowset data structure. Use the Fill method to populate the empty rowset with data. The SetData method associates the rowset data with the chart.

    &rsRowset = CreateRowset(Record.QE_CHART_RECORD); &rsRowset.Fill("where QE_CHART_REGION= :1", "MIDWEST"); &cChart.SetData(&rsRowset);

  3. Set the height and width of the chart.

    Because the chart is not associated with a chart control on a page, you have to specify the size of the chart image to be generated using the Height and Width properties. The unit of measurement for both of these properties is pixels.

    &cChart.Width = 400; &cChart.Height = 300;

  4. Set the data axes, series, and legend for the chart.

    As with all charts, you must set the data axes. If necessary for your data, also set the data series and the legend.

    &cChart.SetDataYAxis(QE_CHART_RECORD.QE_CHART_SALES); &cChart.SetDataXAxis(QE_CHART_RECORD.QE_CHART_PRODUCT); &cChart.SetDataSeries(QE_CHART_RECORD.QE_CHART_REGION); &cChart.HasLegend = True; &cChart.LegendPosition = %ChartLegend_Right;

  5. Generate the URL for the chart.

    Use the GetChartURL method of the Response class to generate the URL that will reference the chart data.

    &sURL = %Response.GetChartURL(&cChart);

  6. Generate the image map.

    Use the ImageMap property to generate the image map for the chart. The Response object uses this value to draw the map.

    &sMap = &cChart.ImageMap;

  7. Create the response chart.

    Use the Write Response class method to generate the chart. Note that first, the data is set using the URL generated with GetChartURL, and then the image map is used.

    %Response.Write("<HTML><IMG SRC="); %Response.Write(&sURL); %Response.Write(" USEMAP=#THEMAP></IMG><MAP NAME=THEMAP>"); %Response.Write(&sMap); %Response.Write("</MAP></HTML>");

Note. If one or more labels does not render in the chart, increase the width of the chart, use shorter label text, or reduce the data set being charted.