Chart Class Properties

These properties are used by the Chart class. The properties are described in alphabetic order.

Description

Note: The AdditionalStyleSuffix property is no longer used in PeopleTools 8.57 and will be ignored.

Description

Note: The AnimationDuration property is no longer used in PeopleTools 8.57 and will be ignored.

Description

Note: The AnimationType property is no longer used in PeopleTools 8.57 and will be ignored.

Description

Use this property to specify a Float value indicating the height of the chart as a proportion of its width.

If the aspect ratio is not defined, a default value of 1 is used on fluid pages.

Note: AspectRatio is ignored on classic pages; instead, the height is determined by the height of the chart page control defined in Application Designer or by the Height and Width properties.

This property is read/write.

Example

&cChart.AspectRatio = 0.8;

Description

Use this property to specify a Float value indicating the height of the chart as a proportion of its width in Portrait mode.

If the aspect ratio portrait is not defined, a default value of 1 is used on fluid pages.

Note: AspectRatioPortrait is ignored on classic pages; instead, the height is determined by the height of the chart page control defined in Application Designer or by the Height and Width properties.

This property is read/write.

Example

&cChart.AspectRatioPortrait = 0.56

Description

Use this property to specify a URL to be launched when the chart background is clicked. The URL must be a fully formed URL specified as a string. For example:

http://example.org/index.htm

The IsChartDrillable property must be set to True to enable clicking on the chart background.

Example

&oChart.IsChartDrillable = True;
&oChart.ChartURL = "http://example.org/index.htm";

Description

Use this property to specify an Integer value that indicates the data selection mode for this Chart instance.

The following lists all the values you can specify. You can use either the numeric or constant value.

Numeric Value

Constant Value

Description

0

%Chart_DataSelection_None

Note: %Chart_DataSelection_None is the default value.

Data selection is not enabled for this Chart instance.

1

%Chart_DataSelection_Single

Only one data point at a time may be selected on this Chart instance.

2

%Chart_DataSelection_Multiple

Multiple data points may be selected on this Chart instance.

This property is read/write.

Example

&oChart.DataSelectionMode =%Chart_DataSelection_Single;

Description

This property sets or returns the row number (after any preprocessing) at which to start plotting. This is useful when you have many rows of data in a rowset, and you want to start at a particular row. This can also be useful for creating your own 'scrolling' effect, by specifying both the start row and how many rows to be displayed (by using the DataWidth property).

If this property is not set, then the value is 1.

This property is read/write.

Description

This property returns or sets the number of rows to plot for a series. The starting point for the number of rows is set with the DataStartRow property. If the DataWidth property value is not set, then the width is from the DataStartRow to the last element in the rowset. If the property value is less than zero, then it will automatically be set to one.

This property is read/write.

Example

Suppose your rowset returned 400 rows. You wouldn't want all 400 to display in your chart. Instead, you'd pick a subset of those rows. The row to start with is set with DataStartRow, while how many rows to display is set with DataWidth.

The following code could be used with a push button connected with a chart. The push button enables the next set of data to appear with the chart.

You do not need to refresh after setting this property. When a method or property is used, the chart is automatically refreshed.

Local Chart &MyChart;

&MyChart = GetChart(ChartRec.DisplayField);
&Start = &MyChart.DataStartRow;
/* display the next 20 rows of data */
&MyChart.DataStartRow = &Start + 20;
&MyChart.DataWidth = 20;

Description

Use this property to specify an Integer value indicating the alignment for the footer text.

The following lists all the values you can specify. You can use either the numeric or constant value.

Numeric Value

Constant Value

Description

1

%ChartTextAlign_Center

Center the displayed text.

2

%ChartTextAlign_End

Right-align the displayed text.

3

%ChartTextAlign_Start

Note: %ChartTextAlign_Start is the default value.

Left-align the displayed text.

This property is read/write.

Description

Use this property to specify the CSS style string that defines the style of the footer text.

This property is read/write.

Example

&oChart.FooterStyle = "color:#f00;font-size:15px";

Description

Use this property to specify the text for the footer for the chart as a String value. The footer appears beneath the chart and is aligned by the setting of the FooterAlignment property.

This property is read/write.

Description

Use this property to specify whether the funnel chart is displayed horizontally or vertically.

You can specify a constant value for this property. Values are:

Constant Value

Description

%Chart_Horizontal

The funnel chart is displayed horizontally.

%Chart_Vertical

The funnel chart is displayed vertically.

The default orientation of the funnel chart is vertical.

This property is read/write.

Example

&oChart.FunnelOrientation = %Chart_Horizontal;

Description

Use this property to set a Boolean value indicating whether to display the funnel chart data as a percentage of the default target value: 100.00.

Note: If this property is True, then any target data specified by the SetFunnelDataTarget method is ignored.

This property is read/write.

Example

&oChart.SetFunnelDataActual(CHART_RECORD.CHART_SALES);
&oChart.FunnelPercentMeasure = True;

Description

Use this property to specify if a legend is displayed with the chart. This property takes a Boolean value: True, if the legend is displayed with the chart, False otherwise.

The default value is False.

This property is read/write.

Note: Legends are not available for funnel charts. Therefore, this property is not applicable for a funnel chart.

Description

Use this property to specify whether the X-axis title is displayed with the chart.

This property takes a Boolean value: True, if the X-axis title appears with the chart; False otherwise.

The default value is True.

Note: When you set the HasXAxis property to false, in addition to the X-axis title, the following auto-generated text is also suppressed: axis line, tick marks, and tick labels.

This property is read/write.

Example

&oChart.HasXAxis = False;

Description

Use this property to specify whether the Y-axis title is displayed with the chart.

This property takes a Boolean value: True, if the Y-axis title appears with the chart; False otherwise.

The default value is True.

Note: When you set the HasYAxis property to false, in addition to the Y-axis title, the following auto-generated text is also suppressed: axis line, tick marks, and tick labels.

This property is read/write.

Example

&oChart.HasYAxis = False;

Description

On a classic page, use this property to specify a Number value indicating the height of the chart in pixels.

Note: On a fluid page, the combination of the AspectRatio, Height, and Width properties are used to determine the size of the chart.

Generally this property is used with charts created for iScripts, to specify the height of the image, before generating the image map. You can also use it to overwrite the height set in Application Designer.

If you try to read this property before setting it, the value returned is zero.

Note: The Height and Width properties must be set to the same value to change the size of a 2D Scatter chart, that is, a chart with the Type property set to %ChartType_2DScatter.

This property is read/write.

Description

Use this property to specify an Integer value that indicates whether the user can toggle the series legend entries to hide or show the corresponding data points for that series.

The following lists all the values you can specify. You can use either the numeric or constant value.

Numeric Value

Constant Value

Description

0

%ChartHideShow_None

Toggling of the series legend entries is disabled.

Note: %ChartHideShow_None is the default value.

1

%ChartHideShow_NoRescale

If the chart displays a legend, the user can toggle the series legend entries to hide or show the corresponding data points for that series and the y-axis will not be rescaled.

2

%ChartHideShow_Rescale

If the chart displays a legend, the user can toggle the series legend entries to hide or show the corresponding data points for that series and the y-axis will be rescaled as necessary.

This property is read/write.

Description

This property returns the HTML client-side image map. The image map is what makes the chart interactive.

This property is read-only.

Description

Use this property to specify a Boolean value indicating whether the chart background (that is, the entire chart control) is interactive.

If both IsChartDrillable and IsDrillable are set to True, the interactivity depends on where the user clicks on the chart. If the user clicks on a data point within the chart (for example, a bar, a pie segment, a dot, and so on), the interactivity specified by IsDrillable is triggered. If the user clicks anywhere else on the chart, the interactivity is specified by either of these two conditions:

  • Any FieldChange PeopleCode that is defined on the record field of the chart control.

  • The URL specified by the ChartURL property.

This property is read/write.

Description

Use this property to specify a Boolean value indicating whether the chart is interactive—that is, whether the user can click on (or touch) the chart to trigger an action. The default value is False.

If both IsChartDrillable and IsDrillable are set to True, the interactivity depends on where the user clicks on the chart. If the user clicks on a data point within the chart (for example, a bar, a pie segment, a dot, and so on), the interactivity specified by IsDrillable is triggered. If the user clicks anywhere else on the chart, the interactivity specified by IsChartDrillable is triggered. When IsDrillable is triggered, the source of interactivity on a chart can come from one of two places:

  • A URL passed through the chart's SetDataURLs method

  • FieldChange PeopleCode on the y-axis data field.

If both a URL is passed through SetDataURLs and FieldChange PeopleCode exists on the y-axis data field, the URL will take precedence over the PeopleCode.

Note: The record that contains the PeopleCode must be in the component buffer at runtime.

See Creating a Chart Using the Chart Class.

This property is read/write.

Description

Use this property to specify a Boolean value indicating whether to display the line chart with smoothed lines. If this property is set to True, the lines that connect the data points on the line chart are smoothed, resulting in curved lines. If this property is set to False, the lines between the data points are drawn straight.

This property is read/write.

Description

Use this property to specify whether the chart is built without interactivity features, such as data hints or drill capability.

If this property is specified as True, you will not be able to click on the chart to trigger an event. In addition, the pop-up data hints will not appear when you pass a mouse over the chart. However, you may see a performance improvement if your chart has an extremely complicated image map and you specify this property as True.

This property takes a Boolean value: True if the chart is built without interactivity, False otherwise.

The default value of this property is False.

This property is read/write.

Description

Use this property to specify a Boolean value indicating whether a chart with two y-axes will be split and displayed as two charts.

The default value is False.

This property is read/write.

Description

This property has been deprecated and is ignored.

Description

Specify whether the x-axis will display integers. Set IsXAxisInteger to True if the x-axis represents integer data, such as the number of people or the number of tasks.

Setting IsXAxisInteger to True is only applicable to line charts, scatter charts, and bubble charts.

This property takes a Boolean value.

The default value of this property is False.

This property is read/write.

Description

Specify whether the y-axis will display integers. Set IsYAxisInteger to True if the y-axis represents integer data, such as the number of people or the number of tasks.

IsYAxisInteger is not used with pie charts and percentage bar charts.

This property takes a Boolean value.

The default value of this property is False.

This property is read/write.

Description

Use this property to specify a Boolean value indicating whether the secondary y-axis will display integers. Set IsY2AxisInteger to True if the secondary y-axis represents integer data, such as the number of people or the number of tasks.

IsY2AxisInteger is not used with pie charts and percentage bar charts.

The default value is False.

This property is read/write.

Description

Use this property to specify where the legend should appear, in relationship to the chart. You can specify either a numeric or constant value for this property.

Note: ChartLegend_Separate generates a legend without a chart. The legend takes over the entire charting area.

The values are:

Numeric Value

Constant Value

Description

0

%ChartLegend_Left

Display legend to the left of the chart.

1

%ChartLegend_Right

Display legend to the right of the chart.

2

%ChartLegend_Top

Display legend on top of the chart.

3

%ChartLegend_Bottom

Display legend below the chart.

4

%ChartLegend_Separate

Generate a legend without a chart.

This property is read/write.

Description

This property has been deprecated and is ignored.

Description

Use this property to specify the text for the main title of the chart as a String value. The main title appears above the chart is aligned according to the TitleAlignment property.

This property is read/write.

Description

Use this property to specify a Number value indicating the minimum height of the chart on fluid pages.

This property is read/write.

Example

&oChart.MinHeight = 30;

Description

Use this property to specify that you want an overlay line chart to be displayed on the chart.

Note: Only charts with the property Type set to 0 (or %ChartType_2DBar) can have an overlay chart. If you specify any other chart type while specifying a value for the OLType property, no overlay chart will be displayed.

You can specify either a numeric or a constant value for this property. The value is:

Numeric Value

Constant Value

Description

4

%ChartType_2DLine

Overlay is drawn as a 2D line.

This property is read/write.

Description

Use this property to specify the CSS style string that defines the style for the pie chart center label.

This property is read/write.

Example

&oChart.PieCenterLabelStyle = "font-size:10px";

Description

Use this property to specify the text for the label, which is displayed at the center of the pie chart.

This property is read/write.

Example

&oChart.PieChartCenterLabel = "Years";

Description

This property has been deprecated and is ignored.

Description

Use this property to specify the text for a subtitle for the chart as a String value. The subtitle appears beneath the main title.

This property is read/write.

Description

This property has been deprecated and is ignored.

Note: The TitleAlignment property controls the alignment of both title and subtitle.

Description

Use this property to specify the CSS style string that defines the style of the subtitle text.

This property is read/write.

Example

&oChart.SubTitleStyle = "font-size:20px";

Description

Use this property to specify an Integer value indicating the alignment for the main title text and subtitle text.

The following lists all the values you can specify. You can use either the numeric or constant value.

Numeric Value

Constant Value

Description

1

%ChartTextAlign_Center

Center the displayed text.

2

%ChartTextAlign_End

Right-align the displayed text.

3

%ChartTextAlign_Start

Note: %ChartTextAlign_Center is the default value.

Left-align the displayed text.

This property is read/write.

Description

Use this property to specify the CSS style string that defines the style of the title text.

This property is read/write.

Example

&oChart.TitleStyle = "font-size:25px;color:#00ffaa";

Description

Use this property to specify the type of chart that you want. You can specify either a numeric or constant value for this property. The valid values are:

Numeric Value

Constant Value

Description

0

%ChartType_2DBar

Two-dimensional bar chart

1

%ChartType_2DStackedBar

Two-dimensional stacked bar chart

2

%ChartType_2DStackedPercentBar

Two-dimensional stacked percent bar chart

3

%ChartType_2DHorizStackedBar

Two-dimensional stacked horizontal bar chart

4

%ChartType_2DLine

Two-dimensional line chart

5

%ChartType_2DSteppedLine

Two-dimensional stepped line chart

6

%ChartType_2DPie

Two-dimensional pie chart

7

%ChartType_3DBar

Note: This constant will be deprecated in a future release and remains for backward compatibility only. Use the %ChartType_2DBar constant instead.

Three-dimensional bar chart

8

%ChartType_3DStackedBar

Note: This constant will be deprecated in a future release and remains for backward compatibility only. Use the %ChartType_2DStackedBar constant instead.

Three-dimensional stacked bar chart

9

%ChartType_3DPie

Note: This constant will be deprecated in a future release and remains for backward compatibility only. Use the %ChartType_2DPie constant instead.

Three-dimensional pie chart

10

%ChartType_2DStackedHorizPercentBar

Two-dimensional stacked horizontal percent chart

11

%ChartType_3DStackedPercentBar

Note: The %ChartType_3DPercentBar and %ChartType_3DStackedPercentBar constants will be deprecated in a future release and remain for backward compatibility only. Use the %ChartType_2DPercentBar constant instead.

Three-dimensional stacked percent bar char

13

%ChartType_2DHorizBar

Two-dimensional horizontal bar chart

14

%ChartType_2DScatter

Scatter chart

18

%ChartType_2DBubble

Bubble chart

31

%ChartType_Funnel

Funnel chart

32

%ChartType_2DRing

Two-dimensional ring chart

33

%ChartType_3DRing

Note: This constant will be deprecated in a future release and remains for backward compatibility only. Use the %ChartType_2DRing constant instead.

Three-dimensional ring chart

This property is read/write.

Description

On a classic page, use this property to specify a Number value indicating the width of the chart in pixels.

Note: On a fluid page, the combination of the AspectRatio, Height, and Width properties are used to determine the size of the chart.

Generally this property is used with charts created for iScripts, to specify the width of the image, before generating the image map. You can also use it to overwrite the width set in Application Designer.

If you try to read this property before setting it, the value returned is zero.

Note: The Height and Width properties must be set to the same value to change the size of a 2D Scatter chart, that is, a chart with the Type property set to %ChartType_2DScatter.

This property is read/write.

Description

This property has been deprecated and is ignored.

Description

This property has been deprecated and is ignored.

Description

The maximum value of the x-axis.

This property is read/write.

Description

The minimum value of the x-axis.

This property is read/write.

Description

Use the XAxisPrecision property to control the number of decimal places displayed in the labels of a numeric x-axis.

This property is read/write.

Description

Use this property to specify the text for the x-axis title.

This property is read/write.

Description

This property has been deprecated and is ignored.

Description

Use this property to specify the maximum value of the secondary y-axis as a Number value.

The maximum value sets the largest value that is displayed on the axis.

Note: If the Y2AxisMax and Y2AxisMin properties are not set, or are set to too narrow a range, ticks may not appear on the secondary y-axis.

This property is read/write.

Description

Use this property to specify the minimum value of the y-axis as a Number value.

The minimum value sets the point at which the chart plots in positive and negative directions.

The default minimum value is the default value of the secondary y-axis.

Note: If the Y2AxisMax and Y2AxisMin properties are not set, or are set to too narrow a range, ticks may not appear on the secondary y-axis.

This property is read/write.

Description

Use this property to specify an Integer value that controls the number of decimal places displayed in the labels of a numeric, secondary y-axis.

This property is read/write.

Description

Use this property to specify the title for the secondary y-axis as a String value.

This property is read/write.

Description

Use this property to specify the orientation of the title for the secondary y-axis.

You can specify either an Integer or constant value for this property. The values are:

Numeric Value

Constant value

Description

0

%ChartText_Horizontal

The secondary y-axis title is displayed horizontally.

90

%ChartText_Vertical

The secondary y-axis title is displayed vertically

This property is read/write.

Description

This property has been deprecated and is ignored.

Description

This property has been deprecated and is ignored.

Description

Use this property to specify the maximum value of the y (data) axis. This property takes a numeric value.

The maximum value sets the largest value that is displayed on the axis.

Note: If the YAxisMax and YAxisMin properties are not set, or are set to too narrow a range, ticks may not appear on the y-axis.

This property is read/write.

Description

Use this property to specify the minimum value of the y-axis. This property takes a numeric value.

The minimum value sets the point at which the chart plots in positive and negative directions.

The default minimum value is the default value of the y-axis.

Note: If the YAxisMax and YAxisMin properties are not set, or are set to too narrow a range, ticks may not appear on the y-axis.

This property is read/write.

Description

Use the YAxisPrecision property to control the number of decimal places displayed in the labels of a numeric y-axis.

This property is read/write.

Description

Use this property to specify the number of minor tick marks along the y (data) axis. This property takes a numeric value.

This property is read/write.

Description

Use this property to specify text of the title for the y-axis.

This property is read/write.

Description

This property has been deprecated and is ignored.