Schultz’s PowerBuilder Notes

Graphs

What is the difference between Value, Category and Series?

  • Value is the dependent variables (y axis)
  • Category is the by component (x axis)
  • Series is the third component in a 3D graph (z axis)

How do I use the ObjectAtPointer( ) function?

The ObjectAtPointer( ) function will allow the user to drill down on clicked graph data. It has three arguments: GraphObject, SeriesNumber, and DataPoint.

The following script is for a datawindow control’s clicked event. It identifies what graph object was clicked, if it is a category or value, it retireves the data in a second DataWindow based o the passed argument.

GrObjectType    ClickedObject
Long        ll_dept_num
String        ls_deptnum
Integer        li_ret, li_series, li_category

ClickedObject = this.ObjectAtPointer(‘gr_1’, li_series, li_category)

//If the userr clicked data or category, find out which one and retrieve second dw  with argument
IF ClickedObject = TypeData! OR ClickedObject = TypeCategory! THEN
   Ls_deptnum = this.CategoryName(‘gr_1’, li_category)
   Ll_deptnum = long(ls_deptnum)
   Dw_detail.title = “Employees in dept “ + ls_deptnum
   Dw_detail.Retrieve(ll_deptnum)
   Dw_detail.show( )
ELSE
   MessageBox(parent.title, “Click a department to see employee names”)
END IF

May 9, 2008 - Posted by rick130 | Presentation Styles | , , , | No Comments Yet

No comments yet.

Leave a comment