Screen Function Dynamics Charts

  

DEVELOPER

Embedded Charts represent the data in a graphical form. This allows you to design a rich user interface for your applications. Charts are available in both PROIV Open Client and MFC. However, the rendition is different in both Open Client and MFC. The Open Client supports Bar, Line, Meter and Pie charts but MFC supports only Line charts. In PROIV MFC, only Line charts appear at runtime irrespective of the chart type (Bar chart and Pie Chart) you have inserted at design time.

Note: Meter charts do not render in PROIV MFC.

You can add the chart object directly on to the screen or using the chart wizard. When you insert the chart directly to your screen, by default, the line chart is added. You can later modify the chart type, for example, Bar chart, and set the properties as required. However, using the wizard, you can select the required chart type and set the general properties before adding the chart object to the function.

You can customize the charts with a large number of properties to control the look and feel. These properties are categorized into groups that affect a specific part of the chart (for example, the grid). The generic PROIV properties, most of which do apply to all chart types, but most of the chart-specific properties are different for the each chart type. You can configure the specific properties at the design time and runtime in logic.

The three elements which control the chart’s design and runtime behavior are Rendition (Chart type, Appearance), Data (retrieved from the associated selection cycle file), and Events.

Rendition

The rendition and appearance of the chart depends upon the properties that you set at the design time and runtime. For example, you can set the tooltip at design time and view them at runtime based on the point you hover the mouse. Also, depending upon the data points and the chart area, the charts can be squeezed in size, truncate, or a scroll bar is generated if the chart is too long.  
Note: You cannot change the chart type at runtime.

Data

The data for a chart comes from a standard PROIV Selection Cycle. Alternatively for Meter chart, you can manually set the data with the values. The elements of the selection cycle’s definition and the data make the chart. You can also use an existing selection cycle used by a list box, and reference it from a new chart object.

You can associate the selection cycle with a number of dynamic objects; for example, you can insert two chart objects (Line and Bar) and one list box with the same selection cycle. At runtime, you can see the list box with the data and charts (line and bar chart) sharing the same selection cycle.

At runtime, the first column in the selection cycle is hidden, and is used to hold the data from the row that is clicked on (as for list boxes), the second column is visible but the data is used for labels or legends (depends on chart type), the other columns must hold the numeric data.

The chart and the data are integrated; you can change the data in the selection cycle at runtime and the chart gets updated automatically when you execute or refresh. The multiple columns in the list box appear as multiple lines in a line chart. You can set the x-axis, y-axis and legend as per your business requirement. For more information, see Types of Charts.

Events

PROIV charts can fire events that you can listen for. Events are triggered when you click on a line, bar or a pie segment in a chart.

There are standard PROIV dynamic logic points: standard validation and custom validation, defined in the charts which are executed when you click on a bar, line or pie segment in the chart. When you click a node on the chart at runtime, RowID property returns the value in the clicked row's hidden column and the ColumnID property returns the function name and tag (separated by a space) of the clicked column. These properties are only available for charts and help you to identify the exact node that was clicked and take the required action. However, no events are triggered when you click in the white space of the chart.

The On Focus and Lost Focus points are available and executed when the chart takes focus and loses focus. This RowID property is mapped to the first column of the selection cycle and is not rendered in the chart.

Note: Meter charts cannot be clicked, so do not support Custom and Standard validation. However, they support the On Focus, Lost Focus logic points and Right-click menu.

For more information, see Screen Function Dynamics – Events for Charts

 

Comment on this topic

Topic ID: 500696