Minecraft Wiki
Advertisement
[view | edit | history | purge]Documentation
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.
  • 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 &nbsp; 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.
  • The width/height of the graph should be a multiplier of 100 to prevent rendering issues.

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
Maximum number of loops have been performed
Maximum number of loops have been performed
Maximum number of loops have been performed
Maximum number of loops have been performed
Maximum number of loops have been performed
Maximum number of loops have been performed

Horizontal graph

{| class="wikitable"
|-
! Year !! Color coverage
|-
| 2015 || {{ICG | type=horizontal | width=500 |50|#BDFCAF| Green 50% |50|#FCAFAF| Red 50%}}
|-
| 2016 || {{ICG | type=horizontal | width=500 |45|#BDFCAF| Green 45% |35|#EEFCAF| Yellow 35% |20|#FCAFAF| Red 20%}}
|-
| 2017 || {{ICG | type=horizontal | width=500 |31|#BDFCAF| Green 31% |46|#EEFCAF| Yellow 46% |23|#FCAFAF| Red 23%}}
|-
| 2018 || {{ICG | type=horizontal | width=500 |28|#BDFCAF| Green 28% |55|#EEFCAF| Yellow 55% |17|#FCAFAF| Red 17%}}
|-
| 2019 || {{ICG | type=horizontal | width=500 |17|#BDFCAF| Green 17% |73|#EEFCAF| Yellow 73% |10|#FCAFAF| Red 10%}}
|}
Year Color coverage
2015
Maximum number of loops have been performed
2016
Maximum number of loops have been performed
2017
Maximum number of loops have been performed
2018
Maximum number of loops have been performed
2019
Maximum number of loops have been performed
[view | edit | history | purge]The above documentation is transcluded from Template:In-cell graph/doc.
Advertisement