The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Sunday, 28 July 2013

Creating Charts in PeopleSoft



Pictures often speak louder than a text data. If you have page which contains huge list of numeric data, then it will be much better read if the data is converted into an appropriate chart. Also it will be very easy to identify high level information from a chart than a grid or scroll. PeopleSoft offers different types of charts that can be added to your application to make meaningful information.

Some of the chart types offered in PeopleSoft are Bar Charts, Stacked Bar Charts, Gantt Charts, Pie Charts, Bubble Charts etc.

If you have the well formatted data upfront, then creating charts is a simpler process. I will just outline the bare minimum steps required to create a chart on a PS Page.

Step 1: Open the page in application designer and place a chart control on the page.

Step 2: Open the chart properties and assign a record field to the chart. Work record will be the best fit for this.

Step 3: Write the code to initiate the chart. You can consider PageActivate event for this. The pseudo will be as below.

Local Chart &Chart;
Rem Get the chart based on the record field associated in step 2.;
&Chart = GetChart(RECORD.FIELD);
Rem Specify the data source record;
&Chart.SetData(Record.MY_DATA_RECORD);
Rem Set X and Y axis for the chart;
&Chart.SetDataXAxis(MY_DATA_RECORD.MY_X_VALUE);
&Chart.SetDataYAxis(MY_DATA_RECORD.MY_Y_VALUE);


You can now customize the look and feel of the chart using the delivered properties & Methods of chart classes such as
1.       SetXAxixLabels – To set the label for X axis.
2.       SetYAxisLabels – To set label for Y axis.
3.       SetLegend – To set legends for the data colors.
4.       SetDataURLs – To open another page when clicking on a data in the graph.
5.       SetDataHints – To show hints for data points on chart.
6.       SetDataColor – To change the color of the data points.
7.       Type -  This property will determine the type of the chart. You can refer the below table to set appropriate value for the chart you desire.
%ChartType_2DBar
Two-dimensional bar chart
%ChartType_2DStackedBar
Two-dimensional stacked bar chart
%ChartType_2DPercentBar
Two-dimensional percent bar chart
%ChartType_2DHorizStackedBar
Two-dimensional stacked horizontal bar chart
%ChartType_2DLine
Two-dimensional line chart
%ChartType_2DHistogram
Two-dimensional histogram chart
%ChartType_2DPie
Two-dimensional pie chart
%ChartType_3DBar
Three-dimensional bar chart
%ChartType_3DStackedBar
Three-dimensional stacked bar chart
%ChartType_3DPie
Three-dimensional pie chart
%ChartType_2DHorizPercentBar
Two-dimensional horizontal percent chart
%ChartType_3DPercentBar
Three-dimensional percent bar char
%ChartType_2DHorizBar
Two-dimensional horizontal bar chart
%ChartType_2DScatter
Scatter chart
%ChartType_2DBubble
Bubble chart



You can even consider creating Pivot Grids for simple data sets, so that it requires no coding and provides more efficient way for creating and using charts. To read on creating pivot grids, read my previous post on the subject.

1 comment:

  1. Thank you for sharing. I use this http://www.pptstar.com/diagrams/pie-charts/. Perhaps I try People Soft, maybe it's like me more.

    ReplyDelete

Followers