Template:Bar chart/doc

This template can be used to create a horizontal bar chart, scrolling down a page, in a format which can be parsed by text-based web browsers. The data items can be simple numbers, or the result of calculations based on template parameters.

Each data number (data1=7, data2=23...), in column 1, is scaled to parameter "data_max=" and the bars are sized by width in units, such as "bar_width=16" and "width_units=em". By default, the data numbers are shown within each bar, but might display outside a bar when a relatively small number generates a short bar. Each bar can also have a comment, such as "comment7=xx" to show "(xx)" after the number in bar 7.

For a 2-column bar chart, the 2nd column items have prefix "col2_" such as scale maximum, col2_data_max=110, and col2_data3=67 with col2_comment3=zz. See below: "Example with two data columns". Each bar chart can be formatted typically within 1/5 second.

Usage and parameters

 * The use of text other than numbers and proper punctuation in a data field will result in an Expression error.

Alignment
To float the bar chart on the right of the page, use To float the bar chart on the left of the page, use To float the bar chart to the center of the page, use The default is none.

Caption
To add a caption to the bottom of the chart, use

Empty cells
Use – or — (or a similar dash character) as a placeholder in a cell where there is no data available. Leaving a cell completely blank can sometimes cause columns to be misaligned.