Template:Chart
| This template uses TemplateStyles: |
| This template uses the Chart extension with sources from Wikimedia Commons. |
Usage
This template implements Wikipedia's #chart extension in a user-friendly manner. In articles and most other places, it should always be used instead of #chart, so that editors are provided with a link (under the chart) to the source data, in case they need to edit it.
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 chart definition.
other data source and border
{{Chart
| chart = Monthly stream discharges.chart
| data = GRDC-1530100 monthly discharge.tab
| border = 1
}}
View source data.
thumbnail, caption, and source
{{Chart
| thumb
| caption = Autobahn network length.
| source = Autobahn network length.tab
| chart = Autobahn network length.Line.chart
}}
Autobahn network length. View source data.
aligned and fixed width
{{Chart
| chart = Autobahn network length.Line.chart
| align = right
| width = 400px
}}
View chart definition.
aligned and fixed width thumbnail
{{Chart
| thumb
| chart = Autobahn network length.Line.chart
| align = left
| width = 400px
}}
View chart definition.
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
}}
Autobahn network length. View 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 |
See also
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.