DECLARE-CHART

Function

Defines the attributes of a chart that you can later display using PRINT‑CHART.

Syntax

DECLARE-CHART chart_name
[TYPE=chart_type_lit]
[CHART-SIZE=(chart_width_int_lit,chart_depth_int_lit)]
[TITLE=title_txt_lit]
[SUB-TITLE=subtitle_txt_lit]
[FILL=fill_lit]
[3D-EFFECTS=3d_effects_lit]
[BORDER=border_lit]
[COLOR-PALETTE=color_palette_lit]
[POINT-MARKERS=point_markers_lit]
[ATTRIBUTES={selector_lit|
   LIST:{selector_list_name_lit|(selector_lit,...)},
     {decl_key_lit,{decl_value_lit|
       LIST:{decl_val_list_name_lit|(decl_val_lit,...)}|
       PALETTE:{color_palette_lit}}},...}}]
[DATA-ARRAY=array_name]
[DATA-ARRAY-ROW-COUNT=row_count_num_lit]
[DATA-ARRAY-COLUMN-COUNT=column_count_num_lit]
[DATA-ARRAY-COLUMN-LABELS={NONE|array_name|(txt_lit,...)}]
[DATA-LABELS=data_labels_lit]
[FOOTER-TEXT=NONE|text_lit]
[SUB-FOOTER-TEXT=NONE|text_lit]
[ITEM-COLOR=(item_color_keyword_lit,{color_value_lit|(r,g,b)})]
[ITEM-SIZE=(item_size_keyword_lit,item_size_num_lit)]
[LEGEND=legend_lit]
[LEGEND-TITLE=legend_title_txt_lit]
[LEGEND-PLACEMENT=legend_placement_lit]
[LEGEND-PRESENTATION=legend_presentation_lit]
[PIE-SEGMENT-QUANTITY-DISPLAY=pie_segment_quantity_display_lit]
[PIE-SEGMENT-PERCENT-DISPLAY=pie_segment_percent_display_lit]
[PIE-SEGMENT-EXPLODE=pie_segment_explode_lit]
[X-AXIS-GRID=x_axis_grid_lit]
[X-AXIS-LABEL=x_axis_label_txt_lit]
[X-AXIS-MIN-VALUE={x_axis_min_value_lit|_num_lit}]
[X-AXIS-MAX-VALUE={x_axis_max_value_lit|_num_lit}]
[X-AXIS-MAJOR-INCREMENT={x_axis_major_increment_lit|_num_lit}]
[X-AXIS-MINOR-INCREMENT=x_axis_minor_increment_num_lit]
[X-AXIS-MAJOR-TICK-MARKS=x_axis_major_tick_marks_lit]
[X-AXIS-MINOR-TICK-MARKS=x_axis_minor_tick_marks_lit]
[X-AXIS-TICK-MARK-PLACEMENT=x_axis_tick_mark_placement_lit]
[X-AXIS-ROTATE=x_axis_rotate_num_lit]
[X-AXIS-SCALE=x_axis_scale_lit]
[Y-AXIS-GRID=y_axis_grid_lit]
[Y-AXIS-LABEL=y_axis_label_lit]
[Y-AXIS-MASK=mask_txt_lit] 
[Y-AXIS-MIN-VALUE={y_axis_min_value_lit|_num_lit}]
[Y-AXIS-MAX-VALUE={y_axis_max_value_lit|_num_lit}]
[Y-AXIS-MAJOR-INCREMENT={y_axis_major_increment_lit|_num_lit}]
[Y-AXIS-MINOR-INCREMENT=y_axis_minor_increment_num_lit]
[Y-AXIS-MAJOR-TICK-MARKS=y_axis_major_tick_marks_lit]
[Y-AXIS-MINOR-TICK-MARKS=y_axis_minor_tick_marks_lit]
[Y-AXIS-TICK-MARK-PLACEMENT=y_axis_tick_mark_placement_lit]
[Y-AXIS-SCALE=y_axis_scale_lit]
[Y2-AXIS-LABEL=y2_axis_label_lit]
[Y2-AXIS-MASK=mask_txt_lit] 
[Y2-AXIS-MIN-VALUE={y2_axis_min_value_lit|_num_lit}]
[Y2-AXIS-MAX-VALUE={y2_axis_max_value_lit|_num_lit}]
[Y2-AXIS-MAJOR-INCREMENT={y2_axis_major_increment_lit|_num_lit}]
[Y2-AXIS-MINOR-INCREMENT=y2_axis_minor_increment_num_lit]
[Y2-AXIS-MAJOR-TICK-MARKS=y2_axis_major_tick_marks_lit]
[Y2-AXIS-MINOR-TICK-MARKS=y2_axis_minor_tick_marks_lit]
[Y2-AXIS-SCALE=y2_axis_scale_lit]
[Y2-COLOR-PALETTE=color_palette_lit]
[Y2-DATA-ARRAY=array_name]
[Y2-DATA-ARRAY-ROW-COUNT=row_count_num_lit]
[Y2-DATA-ARRAY-COLUMN-COUNT=column_count_num_lit]
[Y2-DATA-ARRAY-COLUMN-LABELS={NONE|array_name|(txt_lit,...)}]
[Y2-TYPE=chart_type_lit]
END-DECLARE

Note:

If you do not define the CHART-SIZE in DECLARE-CHART, you must define it in PRINT-CHART.

Arguments

Table 20 describes the DECLARE-CHART arguments. (These arguments are also valid for PRINT-CHART.) Default values are underlined.

Note:

Several of the arguments in Table 20 refer to NewGraphics. To invoke NewGraphics, change the NewGraphics entry in the [Default-Settings] section of SQR.INI to TRUE (NewGraphics=True). (See NewGraphics under [Default-Settings] Section for more information.)

When you use NewGraphics, font values are interpreted as HTML text size values (not point size values). For example, assume you have the following point values:

ITEM-SIZE= ('Title',12)

ITEM-SIZE= ('SubTitle',10)

ITEM-SIZE= ('XAxisLabel',8)

In this example, if NewGraphics=True, you would convert the points size values to HTML text size values similar to the following:

ITEM-SIZE= ('Title',3)

ITEM-SIZE= ('SubTitle',2)

ITEM-SIZE= ('XAxisLabel',1)

HTML text size values are:

1- very small

2 - small

3 - normal size

4 - large

5 - larger

6 - very large

7 - largest

Table 20. DECLARE-CHART Arguments

Argument

Choices

Description

3D-EFFECTS

YES | NO

YES gives your chart depth. NO displays the chart in a two-dimensional mode.

Must be set to YES for other 3D parameters to function.

ATTRIBUTES

See Attributes Argument for information on the valid choices.

Defines the appearance of a chart.

Production Reporting reads and processes the keywords in the ATTRIBUTES argument left-to-right and first-to-last. As a result, a subsequent value setting overrides a previously-established value. Values assigned with DECLARE‑CHART are overridden by values assigned with PRINT-CHART.

Setting the ATTRIBUTES for the ALL selector establishes a default value for all property values within a chart. Any subsequent entry for a specific area, such as Header, overrides the value previously established by the ALL selector. Any invalid combination of selectors, sub-selectors, or declarations produce an error.

Note: Some of the keywords in the ATTRIBUTES argument replace the functionality previously provided by the ITEM-COLOR, ITEM-SIZE, LEGEND-PLACEMENT, FILL, and COLOR-PALETTE arguments. Production Reporting processes all old style keyword, value parameters prior to the new ATTRIBUTES argument. This may result in the new ATTRIBUTES argument overriding a value previously established with the old style keyword, value parameter pairs.

BORDER

YES | NO

Defines whether to draw a border around the chart.

chart_name

User defined chart name.

Name for referencing a chart.

CHART‑SIZE

User defined chart size.

Size of the chart frame in standard Production Reporting coordinate units.

COLOR‑PALETTE

palette_name

Defines the color of the individual data points in charts (for example, bar, slice, point). Use CREATE‑COLOR-PALETTE to define a valid Production Reporting color palette to use.

Note: The defined color palette is only valid when NewGraphics=TRUE.

Note: The FOREGROUND and BACKBROUND declaration keywords in the ATTRIBUTES argument replace the functionality provided by COLOR-PALETTE . As a result, a value set with FOREGROUND or BACKGROUND overrides a value set with COLOR‑PALETTE.

DATA‑ARRAY Y2‑DATA‑ARRAY

array_name

Name of the array containing the data to plot. This must be the name of an array defined with CREATE-ARRAY.

Use DATA‑ARRAY to define the data array for the Y-Axis.

Use Y2‑DATA‑ARRAY to define the data array for the Y2‑Axis. (Y2-Axis values are ignored for pie charts.) Y2‑DATA-ARRAY is only available with NewGraphics.

DATA‑ARRAY-ROW-COUNT

row_count

Number of rows or sets of data to use from the DATA‑ARRAY. If DATA‑ARRAY has a greater number of rows, only DATA‑ARRAY‑ROW-COUNT is included in the chart.

Y2‑DATA‑ARRAY-ROW-COUNT

row_count

(NewGraphics) Number of rows or sets of data to use from Y2‑DATA-ARRAY. If Y2‑DATA-ARRAY has a greater number of rows, only Y2-DATA-ARRAY-ROW-COUNT is included in the chart.

DATA‑ARRAY-COLUMN‑COUNT

column_count

Number of columns to use from DATA‑ARRAY. If the DATA‑ARRAY has a greater number of columns, only DATA-ARRAY-COLUMN-COUNT is included in the chart.

Y2‑DATA‑ARRAY‑COLUMN‑COUNT

column_count

(New Graphics) Number of columns to use from the Y2‑DATA‑ARRAY. If Y2‑DATA-ARRAY has a greater number of columns, only Y2‑DATA-ARRAY-COLUMN-COUNT is included in the chart.

DATA-ARRAY-COLUMN-LABELS

NONE | array_name | (label1,label2, …)

Labels for each Y-Axis value of the data set (fields) in DATA-ARRAY. Labels are displayed in the legend box. Column labels are ignored for pie charts. See Table 65, Chart Array Field Types (fewer than four fields) for applicable fields for each type of chart.

Y2-DATA-ARRAY-COLUMN-LABELS

NONE | array_name| (label1,label2, …)

(New Graphics) Labels for each Y2-Axis value of the data set (fields) in Y2‑DATA-ARRAY. Labels are displayed in the legend box. Column labels are ignored for pie charts. SeeTable 65, Chart Array Field Types (fewer than four fields) for applicable fields for each type of chart.

DATA-LABELS

YES | NO

(NewGraphics) If YES, Production Reporting prints the numeric value above the individual data points. If NO, no numeric values are displayed.

FILL

GRAYSCALE | COLOR | CROSSHATCH | NONE

Type of filling applied to the shapes (for example, bars, pie-segments) that represent the data loaded in the chart. GRAYSCALE varies the density of black dots. COLOR sends color instructions to the current printer. If the current printer does not support color, then it could appear in GRAYSCALE. CROSSHATCH uses patterns to fill the shapes representing each data set. With NONE all graph shapes are filled with white.

Note: The STYLE declaration keyword in the ATTRIBUTES argument replaces the functionality provided by FILL. As a result, a value set with STYLE overrides a value set with FILL.

FOOTER-TEXT

NONE | text

Footer text for the chart. The text is placed at the bottom of the chart.

Default value is NONE.

ITEM-COLOR

ChartBackground—Background color of entire chart area.

ChartForeground—Text and Line color of chart area.

HeaderBackground—Area within the text box specified for the title and sub-title.

HeaderForeground—Text color of the Title and sub-title.

LegendBackground—Area within the box defining the legend.

LegendForeground—Text and Outline color of the legend.

ChartAreaBackground—Area that includes the body of the chart.

ChartAreaForeground—Text and Line colors of the chart area.

PlotAreaBackground—Area within the X and Y Axis of a chart.

Note: For more information see, “Changing Colors with New Graphics” in Volume 1 of the Hyperion SQR Production Reporting Developer's Guide.

(NewGraphics) Color for individual chart items. Specify a chart item and a valid (r,g,b) color to set the color of the chart item.

Note: The COLOR declaration keyword in the ATTRIBUTES argument replaces the functionality provided by ITEM-COLOR. As a result, a value set with COLOR overrides a value set with ITEM-COLOR.

ITEM‑SIZE

Title|SubTitle|XAxisLabel| XAxisMarkers|YAxisLabel| YAxisMarkers|Y2AxisLabel| Y2AxisMarkers|LegendText| LegendTitle

(NewGraphics) Size of the following chart objects. The value is based on HTML text sizes.

  • Title—Chart title

    ITEM-SIZE=('Title',value)

  • SubTitle—Chart subtitle

    ITEM-SIZE= ('SubTitle',value)

  • XAxisLabel—Label below the X Axis of the chart

    ITEM-SIZE= ('XAxisLabel',value)

  • XAxisMarkers—Point labels on the X Axis

    ITEM-SIZE= ('XAxisMarkers',value)

  • YAxisLabel—Rotated label to the left of the chart

    ITEM-SIZE= ('YAxisLabel',value)

  • YAxisMarkers—Point labels on the Y Axis

    ITEM-SIZE= ('YAxisMarkers',value)

  • Y2AxisLabel—Rotated Label to the right of the chart

    ITEM-SIZE= ('Y2AxisLabel',value)

  • Y2AxisMarkers—Point labels on the Y Axis

    ITEM-SIZE= ('Y2AxisMarkers',value)

  • LegendText—Legend text

    ITEM-SIZE= ('LegendText',value)

  • LegendTitle—Legend title

    ITEM-SIZE= ('LegendTitle',value)

Note: If you do not define an ITEM-SIZE value, Production Reporting uses the HTML text value of 3 (normal size).

Note: The POINT-SIZE declaration keyword in the ATTRIBUTES argument replaces the functionality provided by ITEM-SIZE. As a result, values set with POINT-SIZE override values set with ITEM-SIZE.

LEGEND

YES | NO

Defines whether to display a legend.

LEGEND-PLACEMENT

CENTER-RIGHT | CENTER-LEFT | UPPER-RIGHT | UPPER-LEFT | UPPER-CENTER | LOWER-RIGHT | LOWER-LEFT | LOWER-CENTER

Places the legend in the specified location on the chart. The first portion of the placement parameter (CENTER, UPPER, or LOWER) is the vertical position, and the second portion is the horizontal.

Note: The LOCATION declaration keyword in the ATTRIBUTES argument replaces the functionality provided by LEGEND-PLACEMENT. As a result, values set with LOCATION override values set with LEGEND-PLACEMENT.

LEGEND-PRESENTATION

INSIDE | OUTSIDE

If INSIDE, then the legend is presented inside the area defined by the two axes. If OUTSIDE, then the legend is presented within the chart border, but outside of the region represented by the two axes.

LEGEND-TITLE

NONE | text

Title for the legend. If NONE, then no title is displayed in the legend box.

PIE-SEGMENT-EXPLODE

NONE | MAX |MIN | USE‑3RD‑DATA-COLUMN

Controls what pie segments are exploded (selected) within the pie chart. MAX selects the largest segment. MIN selects the smallest segment. If USE-3RD-DATA-COLUMN, then the third field in the DATA-ARRAY is used to determine which pie segments are exploded. This third field should be a CHAR and values of 'YES' or 'Y' indicate that the segment should be exploded.

PIE‑SEGMENT‑PERCENT-DISPLAY

YES | NO

If YES, then percent-of-total figures is presented for each pie segment.

PIE-SEGMENT-QUANTITY-DISPLAY

YES | NO

If YES, then the quantity is presented for each pie segment.

POINT-MARKERS

YES | NO

If YES, then point markers are displayed for line charts. If NO, then point markers are not displayed.

SUB-FOOTER-TEXT

NONE | text

Sub-footer text for the chart. The text is placed below the footer regardless of whether the FOOTER-TEXT is specified.

Default value is NONE.

SUB‑TITLE

NONE | text

Subtitle for the chart. Text is placed below the title regardless of whether or not TITLE is specified.

TITLE

NONE | text

Chart title. Text is placed at the top of the chart.

TYPE Y2‑TYPE (no pie charts)

PIE | BAR | AREA | LINE | STACKED‑BAR | OVERLAPPED‑BAR | FLOATING‑BAR | HISTOGRAM | 100%‑BAR | 100%‑AREA | STACKED‑AREA | HIGH‑LOW‑CLOSE | COMBO | XY‑SCATTER‑PLOT | BUBBLE | RADAR | POLAR | CANDLE-STICK | AREA-RADAR | NONE

Note: NONE is only valid for Y2-TYPE.

Chart type. See “Business Charts” in Volume 1 of the Hyperion SQR Production Reporting Developer's Guide

(Y2-TYPE is only available with NewGraphics.)

Y2-AXIS-COLOR-PALETTE

palette_name

(NewGraphics) Color palette used to color data points in charts (for example, bar, slice, point). You must define a valid Production Reporting color-palette with CREATE‑COLOR-PALETTE.

X-AXIS-GRID Y-AXIS-GRID Y2-AXIS-GRID

YES | NO YES | NO YES | NO

If YES, then a dashed grid line is drawn for each major tick‑mark on the axis. If NO, then no grid line is drawn on this axis.

X-AXIS-LABEL Y-AXIS-LABEL Y2-AXIS-LABEL

NONE | text

Line of text to display below (or alongside) the tick-mark labels on the axis.

(Y2-AXIS-LABEL is only available with NewGraphics.)

X-AXIS-MAX-VALUE

AUTOSCALE | number

Maximum value on the X axis. Data values greater than X‑AXIS-MAX-VALUE are not displayed. AUTOSCALE calculates an appropriate maximum value.

Y-AXIS-MAX-VALUE

AUTOSCALE | number

Maximum value on the Y axis. Data values greater than Y‑AXIS-MAX-VALUE are not displayed. AUTOSCALE calculates an appropriate maximum value.

Y2-AXIS-MAX-VALUE

AUTOSCALE | number

(NewGraphics) Maximum value on the Y2 axis. Data values greater than Y2-AXIS-MAX-VALUE are not displayed. AUTOSCALE calculates an appropriate maximum value.

X-AXIS-MIN-VALUE

AUTOSCALE | number

Minimum value on the X axis. Data values less than X‑AXIS-MIN-VALUE are not displayed. AUTOSCALE calculates an appropriate minimum value.

Y‑AXIS-MIN-VALUE

AUTOSCALE | number

Minimum value on the Y axis. Data values less than Y‑AXIS-MIN-VALUE are not displayed. AUTOSCALE calculates an appropriate minimum value.

Y2-AXIS-MIN-VALUE

AUTOSCALE | number

(NewGraphics) Minimum value on the Y2 axis. Data values less than Y2-AXIS-MIN-VALUE are not displayed. AUTOSCALE calculates an appropriate minimum value.

X-AXIS-MAJOR‑TICK-MARKS

YES | NO

YES displays tick-marks along the axis between X‑AXIS‑MIN‑VALUE and X‑AXIS‑MAX‑VALUE, according to the X‑AXIS‑SCALE setting spaced by X‑AXIS‑MAJOR‑INCREMENT.

Y-AXIS-MAJOR-TICK-MARKS

YES | NO

YES displays tick-marks along the axis between Y‑AXIS‑MIN‑VALUE and Y‑AXIS‑MAX‑VALUE, according to the Y‑AXIS‑SCALE setting spaced by Y‑AXIS‑MAJOR‑INCREMENT.

Y2‑AXIS‑MAJOR‑TICK‑MARKS

YES | NO

(NewGraphics) YES displays tick-marks along the axis between Y2‑AXIS‑MIN‑VALUE and Y2‑AXIS‑MAX‑VALUE, according to the Y2‑AXIS‑SCALE setting spaced by Y2‑AXIS‑MAJOR‑INCREMENT.

Y-AXIS-MASK

‘$999,999.99’

Numeric mask used to format the Y Axis. Follows the edit mask rules defined in Table 56.

Y2-AXIS-MASK

‘099999’

(NewGraphics) Numeric mask used to format the Y2 Axis. Follows the edit mask rules defined in Table 56.

X-AXIS‑MINOR-TICK-MARKS

YES | NO

YES displays tick‑marks along the axis between X‑AXIS‑MIN‑VALUE and X‑AXIS‑MAX‑VALUE, according to the X‑AXIS‑SCALE setting spaced by X‑AXIS‑MINOR‑INCREMENT.

Y-AXIS-MINOR-TICK-MARKS

YES | NO

YES displays tick‑marks along the axis between Y‑AXIS‑MIN‑VALUE and Y‑AXIS‑MAX‑VALUE, according to the Y‑AXIS‑SCALE setting spaced by Y‑AXIS‑MINOR‑INCREMENT.

Y2-AXIS-MINOR-TICK-MARKS

YES | NO

(NewGraphics) YES displays tick‑marks along the axis between Y2‑AXIS‑MIN‑VALUE and Y2‑AXIS‑MAX‑VALUE, according to the Y2‑AXIS‑SCALE setting spaced by Y2‑AXIS‑MINOR‑INCREMENT.

X‑AXIS‑MAJOR-INCREMENT Y-AXIS-MAJOR-INCREMENT Y2-AXIS-MAJOR‑INCREMENT

AUTOSCALE | number

Increment used to space major tick‑marks on the axis. AUTOSCALE calculates an appropriate increment.

(Y2-AXIS-MAJOR-INCREMENT is only available with NewGraphics)

X-AXIS-MINOR‑INCREMENT Y‑AXIS-MINOR-INCREMENT Y2-AXIS‑MINOR-INCREMENT

number

Increment used to space minor tick‑marks on the axis. This must be set for the X-AXIS-MINOR-TICK-MARKS, the Y-AXIS-MINOR-TICK-MARKS, or the Y2-AXIS-MINOR-TICK-MARKS to display.

(Y2-AXIS-MINOR-INCREMENT is only available with NewGraphics)

X‑AXIS‑ROTATE

X-Axis-Rotate = 0 No Rotation

X-Axis-Rotate = 1 Always Rotate

X-Axis-Rotate = n Rotate Labels if: Data-Array-Row-Count > n

Defines the X Axis rotation of Markers.

The default value is 5.

X-AXIS‑TICK-MARK‑PLACEMENT Y-AXIS‑TICK-MARK-PLACEMENT

INSIDE | OUTSIDE | BOTH

INSIDE (or OUTSIDE) directs Production Reporting to place the tick marks on the inside (or outside) of the axis only. BOTH directs Production Reporting to draw the tick-marks such that they appear on both sides of the axis.

These arguments have no meaning in NewGraphics.

X‑AXIS-SCALE Y-AXIS-SCALE Y2‑AXIS‑SCALE

LOG | LINEAR

LOG specifies a logarithmic scale for the axis. Otherwise, the scale is LINEAR.

(Y2-AXIS-SCALE is only available with NewGraphics)

Description

DECLARE-CHART defines the attributes of a chart to print as part of a report. You can use the attributes in any order, with the exception of chart-name, which must follow the DECLARE-CHART keyword. DECLARE‑CHART can only appear in the SETUP section.

A chart defined with DECLARE-CHART prints by referencing its name in PRINT‑CHART. You can override some or all of the chart attributes at run-time with PRINT-CHART. As such, DECLARE-CHART is useful when the basic properties of a chart are common to many PRINT‑CHART commands.

Tip:

All values declared for a chart in the DECLARE-CHART section of an Production Reporting program become the default values for that chart. To override an assigned value, you must set the value in the PRINT-CHART section of the Production Reporting program. The following example illustrates this functionality.

begin-setup
  declare-chart default-chart
    attributes= ('All','Font',31,'Font-Style','Plain','Point-Size',12)
    attributes= ('Header','Font',31,'Font-Style','Bold','Point-Size',18)
    attributes= ('chart1','start-angle',0,''threshold-method','percent',
                'threshold-value',20)
    attributes= ('chart1','3d-depth',5,'3d-rotation',65,
                '3d-elevation',85)
    attributes= ('chart1','cluster-width',75,'cluster-overlap',65)
    attributes= ('legend','location','lower-center')
    attributes= ('chart1.fill','style',LIST:('25per','50per','75per'))
    attributes= ('chart1.line','style',LIST:'linestyle')
    attributes= ('all.line','size',2)
    attributes= ('all.line','color',LIST:(('red'),('green'),('blue')))
    attributes= ('chart1','sort-order','Largest')
    attributes= ('chart1','Background',(230,230,255))
    attributes= ('all-axis.marker','foreground',(230,0,100))
  end-declare 
  create-array
    name = emp_sales
    size = 20
    field = col_name:char:1
    field = sales:number:3
end-setup
begin-report
  create-list
    name='linestyle'
    list=('longdash','shortdash','dashdot','longshort')
  put 'Madeline' 10 12 12
    into emp_sales(0) col_name(0) sales(0) sales(1) sales (2)
  put 'Jacob' 25 35 45
    into emp_sales(1) col_name(0) sales(0) sales(1) sales (2)
  put 'Evan' 18 28 38
    into emp_sales(2) col_name(0) sales(0) sales(1) sales (2)
  put 'Claire' 60 70 80
    into emp_sales(3) col_name(0) sales(0) sales(1) sales (2)
  print-chart default-chart (4,1)
    chart-size = (50,50)
    title = 'Employee Sales'
    type = overlapped-bar
    3D-effects = yes
    x-axis-label = 'Employees'
    y-axis-label = 'Sales (in thousands)'
    sub-yitle = 'Overlapped-Bar Chart'
    data-array-row-count = 4
    data-array-column-count = 4
    data-array-column-labels = ('June', 'July', 'August')
    data-array = emp_sales
    footer-text = 'Keep up the good work'
    sub-footer-text = 'my team'
    attributes= (LIST:('header','footer'),'Font',32,
       'font-style','bold italic','Point-Size',18)
end-report

The FILL specification in DECLARE-PRINTER can influence the appearance of the chart. Table 21 lists the final appearance of the chart with a combination of values for PRINTER.COLOR and CHART.FILL options.

Table 21. PRINTER.COLOR Setting Effect on CHART.FILL

CHART.FILL=

PRINTER.COLOR=Y

PRINTER.COLOR=N

GRAYSCALE

GRAYSCALE

GRAYSCALE

COLOR

COLOR

GRAYSCALE

CROSSHATCH

COLOR-CROSSHATCH

CROSSHATCH

NONE

NONE

NONE

Examples

This example declares a basic sales chart using DECLARE-CHART. Then, for each region, the SUB-TITLE, DATA-ARRAY, and other elements are overridden to provide the chart with the specific features desired.

begin-setup
  declare-chart base_sales_chart
    chart-size           = (30, 20 )
    title                = 'Quarterly Sales'
    sub-title            = none
    fill                 = color
    3d-effects           = yes
    type                 = stacked-bar
    legend-title         = 'Product'
    x-axis-grid          = yes
  end-declare
end-setup
begin-program
  print-chart base_sales_chart
  sub-title            = 'Region I' 
  data-array           = reg1_sales
  data-array-row-count = #rows_reg1
  data-array-column-count = 2
  y-axis-max-value     = #max_of_all_regions
  y-axis-min-value     = #min_of_all_regions
  legend               = no
  print-chart base_sales_chart
  sub-title            = 'Region II' 
  data-array           = reg2_sales
  data-array-row-count = #rows_reg2
  data-array-column-count = 2
  y-axis-max-value     = #max_of_all_regions
  y-axis-min-value     = #min_of_all_regions
  legend               = no
end-program
begin-procedure chart_region_sales ($sub, $ary,
     #rows, #cols,
    #max_of_all_regions,
    #min_of_all_regions)
  print-chart base_sales_chart (20, 15 )
  sub-title                = $sub
  data-array               = all sales
  data-array-row-count     = #rows
  data-array-column-count  = #cols
  data-array-column-labels = ('Q1', 'Q2', 'Q3', 'Q4' )
  y-axis-max-value         = #max_of_all_regions
  y-axis-min-value         = #min_of_all_regions
  chart-size               = (50, 30)
end-procedure