Special container used to display a Chart as a Graphic.
Description
A
ChartBox is a
ShapeBox with its origin in the top left corner of the box. Unlike the
ShapeBox, the
Elastics used are carefully constructed to prevent the origin from moving away from the top left even if the chart is stretched. The overall size of a
ChartBox is determined by the size preferences of its contents.
This is the default
Box used when a
Chart is added to a graphical hierarchy. It is the object returned by
Chart.to-Graphic.
Introduced in:
version 6.0
Constructs a new ChartBox.
...: The rest arguments may be
Shapes, usually
Charts to add to the
ChartBox, event handlers, or graphical option initializations.
Introduced in:
version 6.0
Return the width preference of this Graphic when subjected to a specified height constraint.
ascent, descent: the height constraint, expressed as ascent and descent distances relative to the origin of this
Graphic.
Returns
Overriding
The default method
Graphic.constrain-height simply invokes
Graphic.get-width-preference. This method need not be overridden unless an object needs to take the height constraint into account in computing its width preference.
Classes overriding this method should take care to return a
Dimension which represents the space along the horizontal axis which is required,
including how it relates to their object's origin. In practice, this means that this method should return either an appropriate
OriginElastic, or a
Dimension which will be converted to an appropriate
OriginElastic via the conversion rules described in
Converting Dimensions to OriginElastics.
Important note: Any overriding implementation of this method must include a call to the superclass implementation in order to insure that the layout negotiation is propagated appropriately throughout the entire graphical hierarchy.
Return the height preference of this Graphic when subjected to a specified width constraint.
lextent, rextent: the width constraint, expressed as distances to the left and right relative to the origin.
Returns
Overriding
The default method
Graphic.constrain-width simply invokes
Graphic.get-height-preference. This method need not be overridden unless an object needs to take the width constraint into account in computing its height preference.
Classes overriding this method should take care to return a
Dimension which represents the space along the vertical axis which is required,
including how it relates to their object's origin. In practice, this means that this method should return either an appropriate
OriginElastic, or a
Dimension which will be converted to an appropriate
OriginElastic via the conversion rules described in
Converting Dimensions to OriginElastics.
Important note: Any overriding implementation of this method must include a call to the superclass implementation in order to insure that the layout negotiation is propagated appropriately throughout the entire graphical hierarchy.
Return the height preference of this Graphic.
Returns
Overriding
This method must be defined in a subclass of
Graphic.
Classes overriding this method should take care to return a
Dimension which represents the space along the vertical axis which is desired,
including how it relates to their object's origin. In practice, this means that this method should return either an appropriate
OriginElastic, or a
Dimension which will be converted to an appropriate
OriginElastic via the conversion rules described in
Converting Dimensions to OriginElastics.
Return the width preference of this Graphic.
Returns
Overriding
This method must be defined in a subclass of
Graphic.
Classes overriding this method should take care to return a
Dimension which represents the space along the horizontal axis which is desired,
including how it relates to their object's origin. In practice, this means that this method should return either an appropriate
OriginElastic, or a
Dimension which will be converted to an appropriate
OriginElastic via the conversion rules described in
Converting Dimensions to OriginElastics