打开/关闭搜索
搜索
打开/关闭菜单
通知
打开/关闭个人菜单
查看“帮助:饼状图”的源代码
来自Cookie☆Wiki
查看
阅读
查看源代码
查看历史
associated-pages
帮助
讨论
更多操作
←
帮助:饼状图
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
__NOSHAREDHELP__ {{帮助导航}} <div style="clear: right"></div> == 基本使用方法 == <syntaxhighlight lang="html5"> {{#invoke:Chart|pie chart | delimiter = 【参数项的分隔符(用于分割元组中的各项参数),可选,默认为":"。供参数里本身含有":"的场合使用】 | radius = 【半径大小,单位px,可选,默认150】 | slices = (【数值,如"1,234.5e6"】:【名称】:【颜色,可不填】:【链接,可不填,点饼状图的对应部分会跳转】) … -- 任意多如上格式的元组 | units prefix = 【数据的前缀单位】 | units suffix = 【数据的后缀单位】 | percent = 【是否在图例上标记百分比,任何非空值都表示会标记】 | hide group legends = 【是否隐藏图例,任何非空值都表示会标记】 | color palette module = 【指定配色方案模块,默认为"Module:Chart/DefaultColors"】 }} </syntaxhighlight> <hr/> 颜色参数可以填任意[[wikipedia:zh网页颜色|网页颜色]]。默认来说,此模块为前26个分片定义了默认颜色(参见[[模块:Chart/DefaultColors]]),往后的切片需手动指定颜色。 <hr/> <syntaxhighlight lang="html5"> slices = (...) (...) </syntaxhighlight> 也可以写为: <syntaxhighlight lang="html5"> slice 1 = ... <!--不带括号--> slice 2 = ... </syntaxhighlight> == 使用例 == <syntaxhighlight lang="html5"> {{#invoke:Chart|pie chart | radius = 250 | slices = ( 69 : UDK姐贵 ) ( 7 : MZ姐贵 ) ( 16 : AZS姐贵 ) ( 11 : RI姐贵 ) ( 1 : KG姐贵 ) ( 3 : MKMMKT姐贵 ) ( 25 : SZ姐贵 ) ( 1 : RK姐贵 ) ( 2 : KHK姐贵 ) ( 2 : AKN姐贵 ) ( 4 : YUH姐贵 ) ( 13 : MGR姐贵 ) ( 2 : suger姐贵 ) ( 4 : KN姐贵 ) | units suffix = 票 | percent = true }} </syntaxhighlight> {{#invoke:Chart|pie chart | radius = 250 | slices = ( 69 : UDK姐贵 ) ( 7 : MZ姐贵 ) ( 16 : AZS姐贵 ) ( 11 : RI姐贵 ) ( 1 : KG姐贵 ) ( 3 : MKMMKT姐贵 ) ( 25 : SZ姐贵 ) ( 1 : RK姐贵 ) ( 2 : KHK姐贵 ) ( 2 : AKN姐贵 ) ( 4 : YUH姐贵 ) ( 13 : MGR姐贵 ) ( 2 : suger姐贵 ) ( 4 : KN姐贵 ) | units suffix = 票 | percent = true }} <hr/> <div class="thumb tright"> {{#invoke:Chart|pie chart | slices = ( 69 : UDK姐贵 ) ( 7 : MZ姐贵 ) ( 16 : AZS姐贵 ) ( 11 : RI姐贵 ) ( 1 : KG姐贵 ) ( 3 : MKMMKT姐贵 ) ( 25 : SZ姐贵 ) ( 1 : RK姐贵 ) ( 2 : KHK姐贵 ) ( 2 : AKN姐贵 ) ( 4 : YUH姐贵 ) ( 13 : MGR姐贵 ) ( 2 : suger姐贵 ) ( 4 : KN姐贵 ) | units suffix = 票 | percent = true }} </div> <syntaxhighlight lang="html5" style="width: 50%"> <div class="thumb tright"> {{#invoke:Chart|pie chart | slices = ( 69 : UDK姐贵 ) ( 7 : MZ姐贵 ) ( 16 : AZS姐贵 ) ( 11 : RI姐贵 ) ( 1 : KG姐贵 ) ( 3 : MKMMKT姐贵 ) ( 25 : SZ姐贵 ) ( 1 : RK姐贵 ) ( 2 : KHK姐贵 ) ( 2 : AKN姐贵 ) ( 4 : YUH姐贵 ) ( 13 : MGR姐贵 ) ( 2 : suger姐贵 ) ( 4 : KN姐贵 ) | units suffix = 票 | percent = true }} </div> </syntaxhighlight>
本页使用的模板:
模板:Tnavbar
(
查看源代码
)
模板:帮助导航
(
查看源代码
)
模块:Chart
(
查看源代码
)
模块:Chart/DefaultColors
(
查看源代码
)
返回
帮助:饼状图
。