Chart definition page not found.
Template:Chart: Difference between revisions
Appearance
Content deleted Content added
link to chart definition if no source data |
tweak wording Tag: Reverted |
||
Line 27: | Line 27: | ||
--></div><!-- |
--></div><!-- |
||
-->{{#if: {{{hideSource|}}} ||<!-- |
-->{{#if: {{{hideSource|}}} ||<!-- |
||
--><div><small> |
--><div><small>View or edit {{#if: {{{source|{{{data|}}}}}} |
||
| [[c:Data:{{{source|{{{data|}}}}}}|source data]]. |
| [[c:Data:{{{source|{{{data|}}}}}}|source data]]. |
||
| [[c:Data:{{{definition|{{{1|}}}}}}|chart |
| [[c:Data:{{{definition|{{{1|}}}}}}|chart]]. |
||
}}</small></div><!-- |
}}</small></div><!-- |
||
-->}}<div style="clear:both;"></div></div></includeonly></onlyinclude> |
-->}}<div style="clear:both;"></div></div></includeonly></onlyinclude> |
Revision as of 21:47, 4 June 2025
Copy templates
Standard
{{Chart|chart=.chart}}
Full
{{Chart
| chart =
| data =
| thumb =
| align =
| width =
| border =
| style =
| caption =
| source =
}}
or
{{Chart|thumb|align|width|caption|chart=.chart|data=.tab|border=|style=|source=.tab}}
Examples
full width
{{Chart
| chart = Autobahn network length.Line.chart
}}
View or edit chart.
other data source and border
{{Chart
| chart = Monthly stream discharges.chart
| data = GRDC-1530100 monthly discharge.tab
| border = 1
}}
View or edit source data.
thumbnail, caption, and source
{{Chart
| thumb
| caption = Autobahn network length.
| source = Autobahn network length.tab
| chart = Autobahn network length.Line.chart
}}
View or edit source data.
aligned and fixed width
{{Chart
| chart = Autobahn network length.Line.chart
| align = right
| width = 400px
}}
View or edit chart.
aligned and fixed width thumbnail
{{Chart
| thumb
| chart = Autobahn network length.Line.chart
| align = left
| width = 400px
}}
View or edit [[c:Data: thumb
|chart]].
centered, fixed width, border, caption and source
{{Chart
| chart = Autobahn network length.Line.chart
| align = center
| width = 400px
| caption = Autobahn network length.
| source = Autobahn network length.tab
}}
View or edit source data.
TemplateData
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Chart in articles based on its TemplateData.
TemplateData for Chart
Includes a chart ([[Help:Charts]]) with source attribution and allows adjusting alignment, width, and border.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Display as thumbnail | thumb 1 | Set to any value to display in a gray box like an image thumbnail
| Line | optional |
Alignment | align 2 | Chart alignment, either "left", "right", or "center"
| Line | optional |
Width | width 3 | Width in pixels or percent
| Line | optional |
Caption | caption 4 | Caption to display before the source information. Make sure to use ending punctuation.
| String | optional |
Chart definition | chart definition | Chart on Wikimedia Commons, without the "Data:" prefix
| Line | required |
Chart data | data | .tab on Wikimedia Commons, without the "Data:" prefix (overrides the specification in the chart definition)
| Line | suggested |
Source attribution | source | 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".
| Line | suggested |
Border | border | Set to "1" to enable a border
| Boolean | optional |
CSS styles | style | Additional CSS styles (beyond width and border)
| Line | optional |
Hide source | hideSource | Set to any value to disable linking to the source
| Boolean | optional |