Properties of a Chart control

Use the following tabs to configure the properties of a Chart control.

General

Name Description

Type

The type of the control.

Name

A unique name for the chart.

Security token

Makes the information in the form secure. See Security tokens.

Visible

Makes the control visible at runtime.

Session ID

Global or form variable or form control that is used as session ID.

Configuration

Name Description

Title

The title for the chart.

Query

The query that uses the chart control at runtime. Available options: Workqueue query, Job query, System query.

Group by

Groups the results returned from the query by selected field, such as group the results by the suspend reason so that you can see the total for each unique suspend reason.

The Group by option is only available when you select a query. The fields available in the Group by list depend on the selected query. For example, group by Job creator or Job suspend reason from a job query, and group by Machine name or Suspend reason from a System query.

For a Line chart, the Group by list only includes the datetime options depending on the selected query.

  • When you view the form at runtime and use the Job query, the total results returned per "suspend reason" are displayed on the chart. The "suspend reason" is only recorded against the suspended jobs.

  • When you view the form at runtime and use the System query, the total results returned per suspend reason, and subsequently the active activities within that job are displayed on the chart. If you group by machine, then the results per machine are displayed on the chart. The "suspend reason" is only recorded against suspended jobs.

Time series

The timeframe within which the data is collected for the selected query and "Group by" fields.

The Time series option is only available when you select the following datetime options in the Group by field for the respective query:

  • Workqueue query: Activity due date and Pending time

  • Job query: Job completion time, Job creation time, and Job due date

  • System query: Activity due date, Pending time, and Completed date (This option is only available for completed work)

When you open a form at runtime, the count is displayed corresponding to the Group by fields on the chart. For example, if you select the workqueue query, "All activities", and group by "Activity due date", the following data is displayed at runtime.

Time series

Description

Hour

Gets the data based on hours (0hrs-23hrs). See Example 3: Chart (Pie and Line) displaying the count of activities due for hour

Day of Month

Gets the data from the first to the last day of the month. For example, displays the data for the 23rd or the 31st day of the month.

Day of Year

Gets the data only for the specific days of the year. For example, displays the data for the 235th or the 325th day of the year.

Day of Week (Default)

Gets the data for all the days: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday. For example, displays the data for Monday or Friday.

Week of Year

Gets the data for the specific week of the year. For example, displays the data for the 35th or the 42nd week.

Month

Gets the data for the complete month. For example, displays the data for August or September.

Quarter

Gets the data for the quarter of the year. For example, displays the data for Q1, Q2, Q3, or Q4.

Year

Gets the data of the complete year. For example, displays the data for the year 2022.

Number of segments

The maximum number of segments (slices/bars/columns) displayed in the chart.

Refresh interval

The interval at which the chart refreshes automatically. A value of 0 implies that the content is not refreshed automatically.

Chart type

The type of chart: Bar, Pie, Column, and Line. (Default: Pie)

  • The "Inner padding", "Legend position", "Show legend" and "Show pie with donut" options are only available for a Pie chart.

  • The "Show label" and "Label length" options are only available for Bar and Column charts.

Padding

The space around the control (chart and legend). (Default: 0 for Top, Bottom, Left, and Right)

Inner padding

The amount of padding applied to the inner chart excluding the legend. (Default: 5%)

If you are import or upgrade a form from 7.8 or earlier versions, the default value for inner padding resets to 5%.

Legend position

The position of the legend: Top, Bottom, Left, and Right.

Show legend

If selected, displays the legend for the chart. (Default: Selected)

Show pie with donut

If selected, displays the pie chart with a donut hole. (Default: Selected)

Show label

If selected, displays the label text for the chart.

Label length

The length of the label. (Default: 20)

You can dynamically get or set the properties of the chart control using the following properties. When you configure an action, such as Update control properties or Same page for the chart control, the following properties are available:

  • QueryID

  • GroupByField (get only)

  • GroupByWorkTypeField

  • QueryType

  • TotalReturned (get only)

  • ClickedSegmentTitle: Returns the text displayed on the chart segment.

  • ClickedSegmentCount: Returns the number displayed on the chart segment.

  • ClickedSegmentValue: Returns the value corresponding to the group by fields on the chart segment.

When you execute a form at runtime the properties of the control are updated as configured. For example, if you dynamically update the QueryID and GroupByField for the Update control properties action, the content in the chart control is updated accordingly. See Example 2: Get count, title and ID of a chart segment.

When you add a Clicked event to a Chart control, a hand cursor appears when you hover over the Chart. When you click the Chart, the Clicked event is fired, and the configured actions are executed. Active

If the Clicked event is not configured, the cursor remains as the standard pointer arrow as shown below. Active

Additional information about Chart control

When you upgrade TotalAgility from 7.6.0 or earlier versions or import a form or packages with charts from 7.6.0 or earlier versions, then the default values for the following properties are reset as shown below.

Properties Default value
Show legend

Selected

Show label

Selected

Label length

20

Padding

  • For Pie chart
    • Padding: 0,0,10,0 and Legend position: Top or Bottom

    • Padding: 0,10, 150, 10 and Legend position: Left or Right (Non-touch form)

    • Padding: 0,10,140, 10 and Legend position: Left or Right (Touch form)

For the other chart types (Bar and Column) the Padding values default to 30, 30, 30, 30.