Difference between revisions of "PieChartSegment"
From Sega Retro
Line 1: | Line 1: | ||
− | <includeonly>{{#vardefine:angle|{{{angle|}}}}} | + | <includeonly>{{#vardefine:angle|{{{angle|}}}}}{{#vardefine:colour|{{#if:{{{colour|}}}|{{{colour}}}|{{#sub:{{WikiColour|FG|{{#switch:{{#var:segmentCount}} |
− | + | |0=red | |
− | <div><div style="width:20px; height:20px; background-color: #{{ | + | |1=orange |
+ | |2=yellow | ||
+ | |3=yellowgreen | ||
+ | |4=green | ||
+ | |5=cyan | ||
+ | |6=blue | ||
+ | |7=purple | ||
+ | |8=magenta | ||
+ | |9=redmagenta | ||
+ | }}}}|0|-1}}}}}} | ||
+ | #{{#var:colour}} {{#var:totalAngles}}deg {{#expr:{{#var:totalAngles}}+{{#var:angle}}}}deg,{{#vardefine:totalAngles|{{#expr:{{#var:totalAngles}}+{{#var:angle}}}}}}{{#vardefine:legend|{{#var:legend}} | ||
+ | <div><div style="width:20px; height:20px; background-color: #{{#var:colour}}; border:1px solid #000000; display:inline-block; vertical-align:middle;"></div> {{{caption|}}}</div>}}{{incvar|segmentCount}} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
− | {{#vardefine: | + | {{#vardefine:segmentCount|0}} |
{{PieChart| | {{PieChart| | ||
{{PieChartSegment | {{PieChartSegment | ||
− | | angle= | + | | angle=10 |
− | |||
| caption=aaa | | caption=aaa | ||
}} | }} | ||
{{PieChartSegment | {{PieChartSegment | ||
− | | angle= | + | | angle=20 |
− | |||
| caption=bbb | | caption=bbb | ||
}} | }} | ||
{{PieChartSegment | {{PieChartSegment | ||
− | | angle= | + | | angle=30 |
− | |||
| caption=ccc | | caption=ccc | ||
}} | }} | ||
{{PieChartSegment | {{PieChartSegment | ||
− | | angle= | + | | angle=40 |
− | |||
| caption=ddd | | caption=ddd | ||
}} | }} | ||
{{PieChartSegment | {{PieChartSegment | ||
− | | angle= | + | | angle=50 |
− | |||
| caption=eee | | caption=eee | ||
+ | }} | ||
+ | {{PieChartSegment | ||
+ | | angle=60 | ||
+ | | caption=fff | ||
+ | }} | ||
+ | {{PieChartSegment | ||
+ | | angle=45 | ||
+ | | caption=ggg | ||
+ | }} | ||
+ | {{PieChartSegment | ||
+ | | angle=45 | ||
+ | | caption=hhh | ||
+ | }} | ||
+ | {{PieChartSegment | ||
+ | | angle=10 | ||
+ | | caption=iii | ||
+ | | colour=555555 | ||
}} | }} | ||
}} | }} | ||
[[Category:Templates]]</noinclude> | [[Category:Templates]]</noinclude> |
Revision as of 05:47, 10 March 2022
aaa
bbb
ccc
ddd
eee
fff
ggg
hhh
iii