跳至內容

模板:Bar chart/doc

維基百科,自由的百科全書

參數及使用方法

{{Bar chart
| title         = <!-- Title bolded above table; defaults to "List of cities by population" in {bar_chart}. -->
| class         = <!-- Adds a class= parameter after the {| wikitable header -->
| table_width   = <!-- Sets the overall table width in width_units (or em if width_units is not present) -->
| table_style   = <!-- Additional parameters to be added to the table's style parameter -->
| bar_width     = <!-- uses 30 by default. Must be an unformatted number -->
<!--| width_units   =  uses 'em' units by default -->
| label_type    = <!-- Title for the label column; defaults to "City". -->

| label1        = <!-- Row 1 label -->
| label2        = <!-- Row 2 label -->
...
| label30       = <!-- Row 30 label -->

| data_type     = <!-- Title for column 1 data. In {{Bar chart}}, defaults to "Population". -->
| data_max      = <!-- Upper bound on the values in column 1 data fields (uses data1 if not present) -->
| data1         = <!-- Row 1, Column 1 data -->
| comment1      = <!-- Row 1, Column 1 comment -->
| color1        = <!-- Row 1, Column 1 bar colour -->
| data2         = <!-- Row 2, Column 1 data -->
| comment2      = <!-- Row 2, Column 1 comment -->
| color2        = <!-- Row 2, Column 1 bar colour -->
...
| data30        = <!-- Row 30, Column 1 data. {{Bar chart 4x9}} only supports up to data9. -->
| comment30     = <!-- Row 30, Column 1 comment. {{Bar chart 4x9}} only supports up to comment9.  -->
| color30       = <!-- Row 30, Column 1 bar colour -->

| col2_data_type= <!-- Title for column 2 data -->
| col2_data_max = <!-- Upper bound on the values in column 2 data fields (uses col2_data1 if not present) -->
| col2_data1    = <!-- Row 1, Column 2 data -->
| col2_comment1 = <!-- Row 1, Column 2 comment -->
| col2_data2    = <!-- Row 2, Column 2 data -->
| col2_comment2 = <!-- Row 2, Column 2 comment -->
...
| col2_data30   = <!-- Row 30, Column 2 data. {{Bar chart 4x9}} only supports up to col2_data9.  -->
| col2_comment30= <!-- Row 30, Column 2 comment. {{Bar chart 4x9}} only supports up to col2_comment9.  -->
}}

參見