Difference between revisions of "Template:Data bars/averages/column"

From blackwiki
Jump to navigation Jump to search
imported>Jonathan Lane Studeman
imported>Jonathan Lane Studeman
Line 94: Line 94:
 
{{!}}}</includeonly><noinclude>
 
{{!}}}</includeonly><noinclude>
  
This sub-template handles one "column" of data (zero and positive numbers only) to produce a bar for display inside a [[Data bars|barchart table]].
+
This sub-template handles one "column" of data (zero and positive numbers only) to produce a bar for display inside a [[Template:Data bars|barchart table]].
 
: No more than eight numbers are accepted as unnamed parameters
 
: No more than eight numbers are accepted as unnamed parameters
 
: Colors are named '''color1''', '''color2''', '''color3''', and so on, up to eight colors.
 
: Colors are named '''color1''', '''color2''', '''color3''', and so on, up to eight colors.

Revision as of 08:48, 13 January 2015


This sub-template handles one "column" of data (zero and positive numbers only) to produce a bar for display inside a barchart table.

No more than eight numbers are accepted as unnamed parameters
Colors are named color1, color2, color3, and so on, up to eight colors.
Labels are named label1, label2, label3, and so on, up to eight labels.
A scale number may be specified. If so, the bar size in pixels becomes scale times data.

The template call must be enclosed within a table.

Examples:
Default scale = 1
{| <!------ begin table ------>

{{Data bars/averages/column
|20|color1=red|label1=Cherries
|32|color2=yellow|label2=Bananas
|64|color3=green|label3=Apples
|48|color4=blue|label4=Berries
}}

|} <!------ end table ------>
164
Cherries
Bananas
Apples
Berries
Specified scale = 0.001
{| <!------ begin table ------>

{{Data bars/averages/column
|scale = 0.001
|20000|color1=red|label1=Cherries
|32000|color2=yellow|label2=Bananas
|64000|color3=green|label3=Apples
|48000|color4=blue|label4=Berries
}} 

|} <!------ end table ------> 
164000
Cherries
Bananas
Apples
Berries