Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version


Arguments: chart-or-plot

Returns the value of the chart-objects property of a chart-or-plot. (Despite the word "chart" in the symbol name, this property applies similarly to a chart-widget or a plot-widget.) The value may be set at creation time by passing a chart-objects initarg to make-instance, or any time later by calling (setf chart-objects).

The chart-objects property can be used to specify several attributes of the objects that are displayed in a chart-or-plot. A "chart object" is represented by one of the lines of a multi-line line graph in a chart-widget, for example, or by one of the segments in each bar of a stacked bar graph (also in a chart-widget), or by a group of points that are drawn with a particular icon in a plot-widget. If a chart or plot displays only a single object, then there may be no reason to specify this chart-objects property.

The description of each object can include attributes such as its object-id (an arbitrary identifier), a label to display in the legend, whether to associate the object with a primary or secondary value-axis, and/or whether to currently exclude the object from the chart or plot.

The chart-objects value is a sequence (a vector or list) where each element represents one chart object. The first element of the sequence is said to have an object-index of 0, the second element an object-index of 1, and so on. The element for each object is a property list of keywords and values. Here are the keys that may be used in the plist for an object:

If the chart-objects property is replaced with a different vector or list, then the chart-or-plot will be updated automatically to reflect the new value. But if you modify the existing vector or list, then the widget will not know that anything has changed, and so you would need to call update-chart-widget explicitly to update the display.

Here is a sample chart-objects value that might display bowling scores in a chart-widget for Doris and Hubert, overlaid with the room temperature for each bowling event. Explicit legend labels are supplied so that no on-print-chart-object function needs to be written. The bowling scores will default to being displayed along the scale of the primary value axis, while the temperatures will use the scale of a secondary value axis. Hubert will (for now) be excluded from the chart.

#((:id :doris :label "Doris")
  (:id :hubert :label "Hubert" :exclude t)
  (:id :temperature :label "Temperature" :value-axis 2))

See chart-widget, plot-widget, and also cg-chart-widget.htm.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version