模板:Bartable/doc

維基百科,自由的百科全書
跳至導覽 跳至搜尋

模板介紹[編輯]

本模板適合在表格中創建條形統計圖

使用方式[編輯]

{{Bartable|值|單位|縮放比率|寬度|CSS樣式}}

範例[編輯]

使用範例
範例 顯示效果
{{Bartable|50}}
50 50
 
{{Bartable|100||-1}}
100 100
 
{{Bartable|250||-1}}
250 250
 
{{Bartable|-125||-1}}
-125
 
{{Bartable|-300||-1}}
-300
 
{{Bartable|100|/mm/cm|-1}}
100 mm(10 cm) 100
 
{{Bartable|100|/mm/cm|-1}}
100 mm(10 cm) 100
 
{{Bartable|100|/mm/cm|-1.5}}
100 mm(10 cm) 100
 
{{Bartable|100|/mm/cm|-1|1em}}
100 mm(10 cm) 100
 
{{Bartable|100|/mm/cm|-1|30px}}
100 mm(10 cm) 100
 
{{Bartable|100|/mm/cm|-1|1em|background:red;}}
100 mm(10 cm) 100
 
{{Bartable|100|/mm/cm|-1|1em|border:ridge red;}}
100 mm(10 cm) 100
 

模板數據[編輯]

以下是該模板的模板資料,適用於視覺化編輯器等工具。

Bartable模板資料

<templatedata> { "params": { "1": { "label": "數值", "description": "數值", "example": "100", "type": "number", "default": "0", "autovalue": "0", "required": true }, "2": { "label": "單位", "description": "數值的單位", "example": "/mm/cm", "type": "string", "autovalue": "" }, "3": { "label": "縮放比率", "description": "條形統計圖的縮放比率", "example": "-1", "type": "number", "autovalue": "" }, "4": { "label": "寬度", "description": "條形統計圖的寬度", "example": "1.5em", "type": "string", "default": "2ex" }, "5": { "label": "CSS", "description": "條形統計圖的CSS樣式", "example": "background:red;", "type": "string", "default": "background:#aaa;" } }, "paramOrder": [ "1", "2", "3", "4", "5" ], "description": "在表格中創建條形統計圖", "format": "inline" } </templatedata>

參見[編輯]