Шаблон:Vchart

Материал из UFO Wiki
Перейти к навигации Перейти к поиску
Документация

The Vchart template (also known as Vertical chart or Column chart) is used to display a column chart with a minimum of two columns.

Parameters

{{vchart
| chart-height   = height of the chart (pixels)
| border-colour  = colour of the border (i.e. "blue" or "#0000ff")
| fill-colour    = colour of the filled column (i.e. "black" or "#000000")
| max-value      = maximum value
| axis-label     = label for the Y-axis
| col1-value     = value/data for column #1
| col1-label     = label for column #1
.
.
| col12-value    = value/data for column #12
| col12-label    = label for column #12
}}

Example

{{vchart
| chart-height   = 200
| border-colour  = orange
| fill-colour    = #ffcccc
| max-value      = 500
| axis-label     = Price
| col1-value     = 50
| col1-label     = Item1
| col2-value     = 400
| col2-label     = Item2
| col3-value     = 150
| col3-label     = Item3
| col4-value     = 300
| col4-label     = Item4
| col5-value     = 200
| col5-label     = Item5
}}

produces:

500
1x1-pixel.png
250
1x1-pixel.png
0
Price
1x1-pixel.png
1x1-pixel.png
1x1-pixel.png
Item1
1x1-pixel.png
1x1-pixel.png
1x1-pixel.png
Item2
1x1-pixel.png
1x1-pixel.png
1x1-pixel.png
Item3
1x1-pixel.png
1x1-pixel.png
1x1-pixel.png
Item4
1x1-pixel.png
1x1-pixel.png
1x1-pixel.png
Item5
1x1-pixel.png

 

1x1-pixel.png

 

1x1-pixel.png

 

1x1-pixel.png

 

1x1-pixel.png

 

1x1-pixel.png

 

1x1-pixel.png

 

1x1-pixel.png

 

1x1-pixel.png

 

1x1-pixel.png

 

1x1-pixel.png