跳转到内容

Template:Chart/doc

维基百科,自由的百科全书

:{{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
}}
长度(公里)年份03000600090001万2万1932195019851999200620132020帝国高速公路联邦高速公路(西德)联邦高速公路(德国)帝国高速公路和联邦高速公路网长度变化
查看图表定义

other data source and border

[编辑]
{{Chart
| chart      = Monthly stream discharges.chart
| data       = GRDC-1530100 monthly discharge.tab
| border     = 1
}}
流量 (m³/s)月份0100200300400500一月四月七月十月最低平均最高Hydrograph: Monthly discharge
查看源数据

thumbnail, caption, and source

[编辑]
{{Chart
| thumb
| caption = Autobahn network length.
| source  = Autobahn network length.tab
| chart   = Autobahn network length.Line.chart
}}
长度(公里)年份03000600090001万2万1932195019851999200620132020帝国高速公路联邦高速公路(西德)联邦高速公路(德国)帝国高速公路和联邦高速公路网长度变化
Autobahn network length. 查看源数据

aligned and fixed width

[编辑]
{{Chart
| chart      = Autobahn network length.Line.chart
| align      = right
| width      = 400px
}}
长度(公里)年份03000600090001万2万1932195019851999200620132020帝国高速公路联邦高速公路(西德)联邦高速公路(德国)帝国高速公路和联邦高速公路网长度变化
查看图表定义

aligned and fixed width thumbnail

[编辑]
{{Chart
| thumb
| chart      = Autobahn network length.Line.chart
| align      = left
| width      = 400px
}}
长度(公里)年份03000600090001万2万1932195019851999200620132020帝国高速公路联邦高速公路(西德)联邦高速公路(德国)帝国高速公路和联邦高速公路网长度变化
查看图表定义

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
}}
长度(公里)年份03000600090001万2万1932195019851999200620132020帝国高速公路联邦高速公路(西德)联邦高速公路(德国)帝国高速公路和联邦高速公路网长度变化
Autobahn network length. 查看源数据

TemplateData

[编辑]
以下是该模板的模板数据,适用于可视化编辑器等工具。

Chart模板数据

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

模板参数

参数描述类型状态
Display as thumbnailthumb 1

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

推荐值
thumb
示例值
thumb
单行文本可选
Alignmentalign 2

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

推荐值
left right center
单行文本可选
Widthwidth 3

Width in pixels or percent

推荐值
400px 600px 50% 100%
单行文本可选
Captioncaption 4

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

示例值
This is a chart caption.
字符串可选
Chart definitionchart definition

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

示例值
Example.chart
单行文本必需
Chart datadata

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

示例值
Example.tab
单行文本推荐
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.tab
单行文本推荐
Borderborder

Set to "1" to enable a border

推荐值
1
示例值
1
布尔可选
CSS stylesstyle

Additional CSS styles (beyond width and border)

示例值
border-width:5px;
单行文本可选
Hide sourcehideSource

Set to any value to disable linking to the source

推荐值
1
示例值
1
布尔可选

See also

[编辑]