| Search Locate Previous | Contents |
The conventional barchart is drawn with an entirely arbitrary x-axis. Sometimes it is convenient to specify exactly where on the axis the bars should be placed, and how wide each bar should be. This function always takes a matrix of data and treats the first column as x-values.
ch.Xbar mat
Example
BMAT3 2½2 1 6 4 8 10
ch.Set('style' 'Boxed,ForceZero,Relative')('Head' 'X-axis Barchart')
ch.Set'subhead' 'Requires X-values in 1st Column'
ch.Xbar 2 5 6,BMAT
PGch.Close
Used in conjunction with the bar-width property, this gives complete control over bar placement. The normal styles of floating and relative apply here to generate floating and aggregated charts. Value labels may be placed on top or inside the bars as for normal barcharts. It will not automatically place bars in groups, but with careful use of bar width and placement it is easy to reproduce this layout in your application.
See also ...
BarWidth bar width for X-bar and Gantt
Barchart style
ValueStyle value-tag style