Creating Rating Box Charts Using the RatingBoxChart Class

When you add a rating box chart to a page in 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 the IsDragable property is set to True, drag-and-drop is allowed for the rating box chart. Otherwise, drag-and-drop is not allowed.

When a user drags the node from one quadrant to another, PeopleTools updates the values for the node’s PTXAXISRATINGS and PTYAXISRATINGS values, changing the node’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.