利用者:Omotecho/sandbox/Template:Graph:円グラフ/doc
翻訳のため英語版 &oldid=854444763 から転写、特定版は2018年8月11日 (UTC) 11:49時点における The Rambling Man による版。
これは利用者:Omotecho/sandbox/Template:Graph:円グラフの解説サブページです。 使用方法、カテゴリ、およびその他利用者ページ自体に含まれない情報を収容しています。 |
Pie charts
[編集]You can add a pie chart with a call to this template. This template uses the Vega version 2 JSON specification. An older template {{Pie chart}} is based on CSS rendering. The template GraphChart allows adding of map, line, bar and area charts, as well as stacked line, stacked bar and stacked area charts, but no pie charts. The template GraphChart also uses Vega version 2 and uses Module:Graph with Scribunto/Lua programming. This Template:Graph:PieChart doesn't use Lua.
Parameters
[編集]- radius specifies the radias of the pie chart in pixels, default is 100*legend specifies the title to be displayed above the legend, default is "Legend". To hide legend, set it to a "-" value without quotes.*values this is a list between square brackets of comma separated label value pairs between parentheses like [ {"x": "Peaches","y": 100}, {"x": "Plums","y": 32}]*rangeliteral this can be one of the Vega specified rangeliterals, default is "category10", but can also be a list like ["red", "green"]== Examples ==Example usage:
{{Graph:PieChart|legend=Fruits|radius=125|values= [ {"x": "Peaches","y": 100}, {"x": "Plums","y": 32}, {"x": "Blueberries","y": 80}, {"x": "Strawberries","y": 46}, {"x": "Bananas","y": 41} ] }}
現在、技術上の問題で一時的にグラフが表示されなくなっています。 |
TemplateData
[編集]This template adds a pie chart to the page using Graph extension
パラメーター | 説明 | 型 | 状態 | |
---|---|---|---|---|
Radius | radius | Specify the radius of the pie in number of pixels
| 数値 | 推奨 |
Legend Title | legend | The title that will appear above the legend, or '-' to hide it
| 文字列 | 推奨 |
Inner Radius | innerradius | To create a doughnut chart specify an inner radius
| 数値 | 省略可能 |
Values | values data | Specify the label value pairs
| 不明 | 必須 |
The colors of the slices | rangeliteral colors | The colors of the slices, specified as Vega defined rangeliteral. This can also be a list like [ "red", "green" ]
| 文字列 | 省略可能 |