Passing Data to Charts

To pass data to a chart, use the first field for the descriptions of bars (or lines or areas), and then use one or more additional fields with number series. This procedure is common to many chart types, including line, bar, stacked-bar, 100 percent bar, overlapped bar, histogram, area, stacked-area, and 100 percent area. You can omit the first field, and SQR uses cardinal numbers (1, 2, 3, and so on) for the bars. Only text fields are used for these options.

For pie charts, only one series is allowed. Pie charts are a special case because you can specify which segments to explode, or pull away, from the center of a pie. By using a third field in the array, you can have a series of Y and N values that indicate whether to explode the segment. If Y is the value in the first row of the array, then the pie segment that corresponds to the first row is exploded. With pie charts, you cannot omit the first field with the descriptions. Pie charts cannot have more than 12 segments.

Pie charts display a numeric value next to each segment. The description appears in the legend. In addition, SQR displays a percentage next to the numeric value. You can disable this feature by using the qualifier PIE-SEGMENT-PERCENT-DISPLAY=NO.

When data is passed to an xy scatter plot or a floating-bar chart, the series are paired. A pair in a floating-bar chart represents the base and height of the bars. A pair in an xy scatter plot represents x and y coordinates. In an xy scatter plot, the first field does not have descriptions. In a floating-bar chart, the first field may have descriptions for the bars. For both types, you can have one or more pairs of series.