Search Locate Previous Next Contents

XZones – warning regions for X-axis

Used to set up warning regions on xy and dial charts. Each region is defined by a colour (use colour names or the standard HTML syntax here), the start and end values for the region and an optional pattern number.You may set this as a single string (use ‘/’ to separate each zone, and ‘,’ to separate the parameters within each zone) or as an array of strings, one for each zone:

ch.Set 'xzones' 'Green,1,3,2/Blue,10,12,3'
ch.Set 'xzones' 'Green,1,3,2' 'Blue,10,12,3'

If you only give a start value, the end value defaults to the ‘full-scale deflection’ on a dial chart and the highest tickmark on a conventional chart.

 ch.Set('xr' 200 800)('xt' 100,1)('xzone' 'Green,200,350/Red,750')
 ch.Dial 345

The Zone string gives (at a minimum) the (from,to) x-values as Colour, Pattern and Edge-weight are inherited from the ZoneAttribs otherwise. If you need to override these attributes, then the order of parameters is:

colour,from,to,pattern,weight

and you must give the pattern as its id number (from 1-15 for built-in shadings, or a higher number for a custom pattern). The edge-weight is the required line weight in points, and defaults to zero as these regions are generally un-edged.

See also ...
ch.Dial – dial and gauge charts
Colour Cycle
Shading Patterns
ZoneAttributes – for warning bands


Continue to: YCaption – Y-caption
© Copyright Causeway Graphical Systems Ltd 2003