Minecraft Wiki
Advertisement
This is the documentation page. It should be transcluded into the main template page. See Template:Documentation for more information
Shortcut

This template generates an embedded ratio graph/chart into table cells.

Usage

{{In-cell graph | [|type=<type>] [|width=<width>] [|height=<height>] | <zone 1> | [zone 2] | [zone 3] | ... }}

where:

<zone x> ::= <percentage>|[color]| <content>
  • type: the direction of the graph; either vertical (default) or horizontal (currently broken).
  • width: the width of the cell containing the graph, in pixels.
  • height: the height of the cell containing the graph, in pixels.
  • percentage is the percentage of the zone, without %.
  • color is the CSS color to use as the background of the zone.
  • content is what to be displayed inside the zone.
Notes
  • percentage and color should not have spaces between them and the adjacent pipe characters, or the spaces will be converted to   thus break the template rendering.
  • Zone's content will be aligned to the center both horizontally and vertically.
  • Total percentage values of zones must be exactly 100, otherwise it will render incorrectly.
  • In the same row/column, in-cell graphs should have the same height/width.

Examples

Vertical graph

{| class="wikitable"
! Block !! [[Silk Touch|Silk touch]] !! Correct tool !! [[Fortune]] 1 !! [[Fortune]] 2 !! [[Fortune]] 3 !! Incorrect tool
|-
| {{BlockLink|Coal Ore}}
| {{ICG | height=150 |100|#FCD6AF| 1 {{BlockSprite|link=Coal Ore|Coal Ore}} (100%) }}
| {{ICG | height=150 |100|#FCD6AF| 1 {{ItemSprite|link=Coal|Coal}} (100%) }}
| {{ICG | height=150 |67|#FCD6AF| 1 {{ItemSprite|link=Coal|Coal}} (67%) |33|#EEFCAF| 2 {{ItemSprite|link=Coal|Coal}} (33%) }}
| {{ICG | height=150 |50|#FCD6AF| 1 {{ItemSprite|link=Coal|Coal}} (50%) |25|#EEFCAF| 2 {{ItemSprite|link=Coal|Coal}} (25%) |25|#BDFCAF| 3 {{ItemSprite|link=Coal|Coal}} (25%) }}
| {{ICG | height=150 |40|#FCD6AF| 1 {{ItemSprite|link=Coal|Coal}} (40%) |20|#EEFCAF| 2 {{ItemSprite|link=Coal|Coal}} (20%) |20|#BDFCAF| 3 {{ItemSprite|link=Coal|Coal}} (20%) |20|#AFFCEF| 4 {{ItemSprite|link=Coal|Coal}} (20%) }}
| {{ICG | height=150 |100|#FCAFAF| {{BlockSprite|Air}} Nothing (100%) }}
|}
Block Silk touch Correct tool Fortune 1 Fortune 2 Fortune 3 Incorrect tool
Coal Ore
1 (100%)
1 (100%)
1 (67%)
2 (33%)
1 (50%)
2 (25%)
3 (25%)
1 (40%)
2 (20%)
3 (20%)
4 (20%)
Nothing (100%)

Horizontal graph

{| class="wikitable"
|-
! Year !! Color coverage
|-
| 2015 || {{ICG | type=horizontal | width=500 |50|#FCD6AF| Green 50% |50|#FCAFAF| Red 50%}}
|-
| 2016 || {{ICG | type=horizontal | width=500 |45|#FCD6AF| Green 45% |35|#EEFCAF| Yellow 35% |20|#FCAFAF| Red 20%}}
|-
| 2017 || {{ICG | type=horizontal | width=500 |31|#FCD6AF| Green 31% |46|#EEFCAF| Yellow 46% |23|#FCAFAF| Red 23%}}
|-
| 2018 || {{ICG | type=horizontal | width=500 |28|#FCD6AF| Green 28% |55|#EEFCAF| Yellow 35% |17|#FCAFAF| Red 17%}}
|-
| 2019 || {{ICG | type=horizontal | width=500 |17|#FCD6AF| Green 17% |73|#EEFCAF| Yellow 35% |10|#FCAFAF| Red 10%}}
|}
Year Color coverage
2015
Green 50%
Red 50%
2016
Green 45%
Yellow 35%
Red 20%
2017
Green 31%
Yellow 46%
Red 23%
2018
Green 28%
Yellow 35%
Red 17%
2019
Green 17%
Yellow 35%
Red 10%



Advertisement