Jump to content

Template:ChartDisplay/doc

From Wikipedia, the free encyclopedia

Copy templates

[edit]

Standard

{{ChartDisplay|chart=.chart}}

Full

{{ChartDisplay
| chart      = 
| data       = 
| thumb      =
| align      = 
| width      = 
| border     = 
| style      = 
| caption    =
| source     = 
}}

or

{{ChartDisplay|thumb|align|width|caption|chart=.chart|data=.tab|border=|style=|source=.tab}}

Examples

[edit]

full width

[edit]
{{ChartDisplay
| chart = Autobahn network length.Line.chart
}}
Länge in KilometernJahr03K6K9K12K15K1932195019851999200620132020ReichsautobahnBundesautobahn (West Germany)Bundesautobahn (Germany)Entwicklung der Netzlänge von Reichs- und B...
See or edit chart definition.

other data source and border

[edit]
{{ChartDisplay
| chart      = Monthly stream discharges.chart
| data       = GRDC-1530100 monthly discharge.tab
| border     = 1
}}
Discharge in m³/sMonth0100200300400500JanMarMayJulSepNovMinMeanMaxHydrograph: Monthly discharge
See or edit source data.

thumbnail, caption, and source

[edit]
{{ChartDisplay
| thumb
| caption = Autobahn network length.
| source  = Autobahn network length.tab
| chart   = Autobahn network length.Line.chart
}}
Länge in KilometernJahr03K6K9K12K15K1932195019851999200620132020ReichsautobahnBundesautobahn (West Germany)Bundesautobahn (Germany)Entwicklung der Netzlänge von Reichs- und B...
Autobahn network length. See or edit source data.

aligned and fixed width

[edit]
{{ChartDisplay
| chart      = Autobahn network length.Line.chart
| align      = right
| width      = 400px
}}
Länge in KilometernJahr03K6K9K12K15K1932195019851999200620132020ReichsautobahnBundesautobahn (West Germany)Bundesautobahn (Germany)Entwicklung der Netzlänge von Reichs- und B...
See or edit chart definition.

aligned and fixed width thumbnail

[edit]
{{ChartDisplay
| thumb
| chart      = Autobahn network length.Line.chart
| align      = left
| width      = 400px
}}
Länge in KilometernJahr03K6K9K12K15K1932195019851999200620132020ReichsautobahnBundesautobahn (West Germany)Bundesautobahn (Germany)Entwicklung der Netzlänge von Reichs- und B...
See or edit chart definition.

centered, fixed width, border, caption and source

[edit]
{{ChartDisplay
| chart      = Autobahn network length.Line.chart
| align      = center
| width      = 400px
| caption    = Autobahn network length.
| source     = Autobahn network length.tab
}}
Länge in KilometernJahr03K6K9K12K15K1932195019851999200620132020ReichsautobahnBundesautobahn (West Germany)Bundesautobahn (Germany)Entwicklung der Netzlänge von Reichs- und B...
Autobahn network length. See or edit source data.

TemplateData

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:ChartDisplay in articles based on its TemplateData.

TemplateData for ChartDisplay

Includes a chart ([[Help:Charts]]) with source attribution and allows adjusting alignment, width, and border.

Template parameters

ParameterDescriptionTypeStatus
Display as thumbnailthumb 1

Set to any value to display in a gray box like an image thumbnail

Suggested values
thumb
Example
thumb
Lineoptional
Alignmentalign 2

Chart alignment, either "left", "right", or "center"

Suggested values
left right center
Lineoptional
Widthwidth 3

Width in pixels or percent

Suggested values
400px 600px 50% 100%
Lineoptional
Captioncaption 4

Caption to display before the source information. Make sure to use ending punctuation.

Example
This is a chart caption.
Stringoptional
Chart definitionchart definition

Chart on Wikimedia Commons, without the "Data:" prefix

Example
Example.chart
Linerequired
Chart datadata

.tab on Wikimedia Commons, without the "Data:" prefix (overrides the specification in the chart definition)

Example
Example.tab
Linesuggested
Source attributionsource

Source .tab file to be linked at the bottom, without the "Data:" prefix. If not specified, it will fallback to displaying the value of "data" or "chart".

Example
Example.tab
Linesuggested
Borderborder

Set to "1" to enable a border

Suggested values
1
Example
1
Booleanoptional
CSS stylesstyle

Additional CSS styles (beyond width and border)

Example
border-width:5px;
Lineoptional
Hide sourcehideSource

Set to any value to disable linking to the source

Suggested values
1
Example
1
Booleanoptional

See also

[edit]