Search Locate Previous Next Contents

KeyStyle – key style

Set the key layout and optionally box the key.

chSet 'kstyle' 'boxed,vert'

Options

boxed:nobox ... Draw box around completed key
shadowed:noshadow ... Add drop-shadow to box
rounded:square ... Corner style
vertical:horizontal ... Alignment of key entries
reversed:normal ... Order of key entries
inline:legend ... Placement of key text
relative;absolute ... Key placement
plain:markers ... Omit markers in key
manual:autofit ... Reduce font size until key fits frame
pitch=120% ... Set the line-spacing for multi-line key text
effect=id ... Attach a defined effect to the key text

Options in bold are the normal defaults. Markers are normally included in keys if they are shown on each line – they can be omitted with style ‘plain’. When you use chWriteKey to place the key explicitly, the keys are normally positioned relative to the current (x,y) axes (style ‘Relative’) but you can choose to use absolute coordinates here, in which case you give the position of the key in Points from the chart origin (where the Axes would normally cross).

Any of the key layouts may be used with the autofit style. This starts with the type-size you specify and progressively reduces the font until the entire key fits into the available space. This may be a useful option if you are generating the key text from descriptions on a database, and hence do not know in advance how much space to allow for the key.

You would often want the ‘reversed’ ordering for stacked barcharts or surface charts. In this case the ‘reversed,vertical’ style means that the boxes in the key match the ordering of the bars or surfaces.

The ‘inline’ style is only used for Lineplots. It writes the key text immediately to the right of the last point on the line, so is appropriate for timeseries data with well-separated lines. It may be necessary to increase the space in the right margin to make room for long series names.

See also ...
chWriteKey – output key at given location
Using Autofit with Keys


Continue to: KeyType – key type override
© Copyright Causeway Graphical Systems Ltd 2003