LinkedIn
Copied!

Table of Contents

JSP tag — chart

Version:

Only available versions of this content are shown in the dropdown

Use the chart tag to present an interactive chart defined by a summary view rule, that has Interactive as the Chart Output Type value on the Chart tab of the rule form.

Use the chart tag only in advanced situations where hand-crafted HTML code and advanced options are necessary. In most cases, you can add a chart display to a Harness, Section, or Flow action directly using the Chart control in the Advanced Group of controls. See Harness and Section forms — Adding a chart display.

Syntax

If you do need to use the JSP tag, use this syntax:

<pega:chart
	name="Purpose"
	className="AppliesTo"
	owner="ALL"
	action="refresh"
	width="NNN"
	height="NNN"
	timeout="NNNNN"
</pega:chart>

The name attribute is required. All attributes are lowercase. Enter attribute values in exact case.

Attribute Value
name Second key part — View Purpose — of a summary view rule.
className Optional. Applies To key part of a summary view rule. If omitted, the class of the primary page in the runtime context is used.
owner Optional. Final key part — Owner — of a summary view rule. If omitted, the default value is ALL.
action Optional. Choose:
  • refresh — To force recomputation and regeneration of the interactive chart. This is the default value if omitted.
  • reuse — to recompute and regenerate the interactive chart only if a previous file has expired.
height Optional. Enter a number for the height of the interactive chart in pixels, or a percentage of the window size followed by the % character. If present, this overrides any value in the summary view rule.
width Optional. Enter a number for the width of the interactive chart in pixels, or a percentage of the window size followed by the % character. If present, this overrides any value in the summary view rule.
timeout Optional. Enter a number of seconds to cache the chart.

If the summary view depends on parameters, you can add parameters to the current parameter page using notation similar to:

<pega:param Name="NAME" value="VALUE" />

where the VALUE can be a literal constant or an expression.

Examples

The standard HTML rule Data-Gadget.IChartsDashboard presents the WorkManager portal using the chart JSP tag.

The HTML code below displays the interactive chart named Work-.CountResolvedbyResolverTop5IC executed in the class context of a work pool determined at runtime. The image occupies the full width of the window, but only half the height. The SinceDate parameter, part of the selection criteria, is set to 30 days ago by calling a function rule.

The generated image is stored as a static content item, but expires after an hour (3,600 seconds) and must be regenerated if needed after that timeout period.

<pega:chart
	name="CountResolvedByResolverTop5IC"
	className="$SAVE(workpool)"
	width="100%"
	height="50%"
	timeout="3200">
		<pega:param name="SinceDate"
		value="<%=pega_rules_businesscalendar.addDays("",-30, false,"")%>"/>
</pega:chart>

JavaServer Page tags

Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.