模板:Chart/doc
页面Module:Message box/mbox.css没有内容。
| File:Edit-copy green.svg | 此页面是Template:Chart的模板文档。 此页面可能包含了模板的使用说明、分类和其他内容。 |
注:{{Chart}}曾是系谱图模板,已于2019年同英维移动至{{Tree chart}}。之后英维将{{Chart}}提删,但其在中维被保留,故此后很长一段时间其为{{Tree chart}}的重定向。2025年,英维将{{Chart}}重建为图表模板,如今中维也已同步。故若您想要绘制系谱图,请使用{{Tree chart}},不要再误用本模板。
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
}}
页面Template:Chart/styles.css没有内容。
other data source and border[编辑]
{{Chart
| chart = Monthly stream discharges.chart
| data = GRDC-1530100 monthly discharge.tab
| border = 1
}}
页面Template:Chart/styles.css没有内容。
thumbnail, caption, and source[编辑]
{{Chart
| thumb
| caption = Autobahn network length.
| source = Autobahn network length.tab
| chart = Autobahn network length.Line.chart
}}
页面Template:Chart/styles.css没有内容。
aligned and fixed width[编辑]
{{Chart
| chart = Autobahn network length.Line.chart
| align = right
| width = 400px
}}
页面Template:Chart/styles.css没有内容。
aligned and fixed width thumbnail[编辑]
{{Chart
| thumb
| chart = Autobahn network length.Line.chart
| align = left
| width = 400px
}}
页面Template:Chart/styles.css没有内容。
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
}}
页面Template:Chart/styles.css没有内容。
TemplateData[编辑]
<templatedata> { "params": { "data": { "label": "Chart data", "description": ".tab on Wikimedia Commons, without the \"Data:\" prefix (overrides the specification in the chart definition)", "type": "line", "suggested": true, "example": "Example.tab" }, "width": { "type": "line", "suggestedvalues": [ "400px", "600px", "50%", "100%" ], "aliases": [ "3" ], "label": "Width", "description": "Width in pixels or percent" }, "border": { "type": "boolean", "label": "Border", "description": "Set to \"1\" to enable a border", "example": "1", "suggestedvalues": [ "1" ] }, "source": { "label": "Source attribution", "type": "line", "description": "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", "suggested": true }, "style": { "label": "CSS styles", "description": "Additional CSS styles (beyond width and border)", "type": "line", "example": "border-width:5px;" }, "chart": { "aliases": [ "definition" ], "label": "Chart definition", "description": "Chart on Wikimedia Commons, without the \"Data:\" prefix", "example": "Example.chart", "type": "line", "required": true }, "align": { "aliases": [ "2" ], "label": "Alignment", "description": "Chart alignment, either \"left\", \"right\", or \"center\"", "type": "line", "suggestedvalues": [ "left", "right", "center" ] }, "thumb": { "aliases": [ "1" ], "label": "Display as thumbnail", "description": "Set to any value to display in a gray box like an image thumbnail", "example": "thumb", "type": "line", "suggestedvalues": [ "thumb" ] }, "caption": { "aliases": [ "4" ], "label": "Caption", "description": "Caption to display before the source information. Make sure to use ending punctuation.", "example": "This is a chart caption.", "type": "string" }, "hideSource": { "label": "Hide source", "description": "Set to any value to disable linking to the source", "example": "1", "type": "boolean", "suggestedvalues": [ "1" ] } }, "description": "Includes a chart (Help:Charts) with source attribution and allows adjusting alignment, width, and border.", "paramOrder": [ "thumb", "align", "width", "caption", "chart", "data", "source", "border", "style", "hideSource" ] } </templatedata>
See also[编辑]