Legend

Vorlage:Uses TemplateStyles Shows a legend row with a colored box.

Usage

{{legend|background-color|caption|outline=outline color|border=css border}}
  • background-color is passed to the css background-color property of the color box.
  • The optional outline parameter is the color of the outline around the box.
  • The optional border argument which overrides the outline argument and sets the css description (e.g., 1px solid #aaa) of the border that will be drawn around the box.

Examples

Use in text

{{legend|black|Africa}}
{{legend|green|Americas}}
{{legend|blue|Oceania}}
{{legend|#ffa|Europe|outline=silver}}
{{legend|#ff2800|Asia|outline=#A2A9B1}}  (#A2A9B1 is the wikitables border color.)
  Africa
  Americas
  Oceania
  Europe
  Asia

Use in captions

Vorlage:Markup

Full parameter list

{{legend
| [legend box's colo(u)r]
| [text following legend box]
| outline =  <!--colo(u)r of border around legend box-->
| border =   <!--use to specify custom CSS styling for border (overrides 'outline')-->
| color =    <!--colo(u)r of 'text'-->
| size =     <!--'text' font-size-->
| text =     <!--to place text inside the legend box-->
}}

Limitations

Using certain special characters in Vorlage:Para that have meaning in wikitext can cause unexpected results. To use Vorlage:Asterisk in Vorlage:Para, use Vorlage:Para. To use # in Vorlage:Para, use Vorlage:Para.

See also

TemplateData

TemplateData

Nachfolgend finden sich die TemplateData Informationen für diese Vorlage. Genutzt werden diese Daten von den Extensions TemplateWizard, VisualEditor und vielen weiteren.

VorlagenDaten/TemplateData für das Template "Legend"

Shows a legend row with a colored box and a caption.

Vorlagenparameter

ParameterBeschreibungTypStatus
Color1

The color for the legend entry, in any CSS format

Standard
leer
Beispiel
"#6D6E00", "#ffa", "yellow"
Autowert
leer
Zeileerforderlich
Caption2

Label for the legend entry

Standard
leer
Beispiel
"soda" is most common
Autowert
leer
Zeichenfolgevorgeschlagen
CSS border styleborder

CSS style for the legend entry's border

Standard
leer
Beispiel
leer
Autowert
leer
Zeichenfolgeoptional
Entry outlineoutline

CSS color for the outline of the legend entry

Standard
leer
Beispiel
silver
Autowert
leer
Zeileoptional
Text in the entrytext

Text to be displayed in the legend entry box, i.e. within the color specified

Standard
leer
Beispiel
Af
Autowert
leer
Zeileoptional
Text colortextcolor

CSS color of text inside the legend's colored box

Standard
leer
Beispiel
leer
Autowert
leer
Zeichenfolgeoptional
Sizesize

Font size of the legend entry, including colored box

Standard
leer
Beispiel
leer
Autowert
leer
Zeichenfolgeoptional