Widget:Radar: Difference between revisions
From Elwiki
mNo edit summary |
mNo edit summary |
||
Line 64: | Line 64: | ||
<!--{$fontcorrection=$fontsize|default:24}--> | <!--{$fontcorrection=$fontsize|default:24}--> | ||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="<!--{$x1}--> <!--{$y1}--> <!--{$dx}--> <!--{$dy}-->" style="width: 100%;"> | <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="<!--{$x1}--> <!--{$y1}--> <!--{$dx}--> <!--{$dy}-->" style="width: 100%;"> | ||
<!--{strip}--> | |||
<polygon stroke="#ccc" fill="#eee" points=" | <polygon stroke="#ccc" fill="#eee" points=" | ||
<!--{for $i=1 to $dim}--> | <!--{for $i=1 to $dim}--> | ||
Line 69: | Line 70: | ||
<!--{/for}--> | <!--{/for}--> | ||
"></polygon> | "></polygon> | ||
<!--{/strip}--> | |||
<!--{strip}--> | |||
<polygon stroke="#ccc" fill="#fff" points=" | <polygon stroke="#ccc" fill="#fff" points=" | ||
<!--{for $i=1 to $dim}--> | <!--{for $i=1 to $dim}--> | ||
Line 74: | Line 77: | ||
<!--{/for}--> | <!--{/for}--> | ||
"></polygon> | "></polygon> | ||
<!--{/strip}--> | |||
<!--{strip}--> | |||
<polygon stroke="#ccc" fill="#eee" points=" | <polygon stroke="#ccc" fill="#eee" points=" | ||
<!--{for $i=1 to $dim}--> | <!--{for $i=1 to $dim}--> | ||
Line 79: | Line 84: | ||
<!--{/for}--> | <!--{/for}--> | ||
"></polygon> | "></polygon> | ||
<!--{/strip}--> | |||
<!--{strip}--> | |||
<polygon stroke="#ccc" fill="#fff" points=" | <polygon stroke="#ccc" fill="#fff" points=" | ||
<!--{for $i=1 to $dim}--> | <!--{for $i=1 to $dim}--> | ||
Line 84: | Line 91: | ||
<!--{/for}--> | <!--{/for}--> | ||
"></polygon> | "></polygon> | ||
<!--{/strip}--> | |||
<!--{strip}--> | |||
<polygon stroke="#ccc" fill="#eee" points=" | <polygon stroke="#ccc" fill="#eee" points=" | ||
<!--{for $i=1 to $dim}--> | <!--{for $i=1 to $dim}--> | ||
Line 89: | Line 98: | ||
<!--{/for}--> | <!--{/for}--> | ||
"></polygon> | "></polygon> | ||
<!--{/strip}--> | |||
<!--{for $i=1 to $dim}--> | <!--{for $i=1 to $dim}--> | ||
<line x1="0" y1="0" x2="<!--{$xs[$i]*200}-->" y2="<!--{$ys[$i]*200}-->" stroke="#ccc"></line> | <line x1="0" y1="0" x2="<!--{$xs[$i]*200}-->" y2="<!--{$ys[$i]*200}-->" stroke="#ccc"></line> | ||
<!--{strip}--> | |||
<text | <text | ||
transform=" | transform=" | ||
Line 103: | Line 114: | ||
<!--{$label[$i-1]|default:''|escape:'html'}--> | <!--{$label[$i-1]|default:''|escape:'html'}--> | ||
</text> | </text> | ||
<!--{/strip}--> | |||
<!--{/for}--> | <!--{/for}--> | ||
<!--{strip}--> | |||
<polygon stroke-width="0" fill="<!--{$color}-->7f" points=" | <polygon stroke-width="0" fill="<!--{$color}-->7f" points=" | ||
<!--{for $i=1 to $dim}--> | <!--{for $i=1 to $dim}--> | ||
Line 112: | Line 126: | ||
<!--{/for}--> | <!--{/for}--> | ||
"></polygon> | "></polygon> | ||
<!--{/strip}--> | |||
</svg> | </svg> | ||
<!--{/nocache}--> | <!--{/nocache}--> | ||
</div></includeonly> | </div></includeonly> |
Revision as of 08:21, 29 May 2020
Widget:Radar is a component for radar chart.
Arguments are listed as following:
- Array argument(s) can be called multiple times.
Key | Type | Description | Default |
---|---|---|---|
size | Number | Size of the chart | (Depends on parent container) |
dim | Integer | Number of axes | |
fontfamily | String | Name of font(s) | Microsoft YaHei |
fontsize | Number | Font size | 24 |
color | HexColor (#RRGGBB format only) | The color for the radar area | |
label | Array<String> | Label(s) for each axis in sequence | (Empty String) |
max | Array<Number> or Integer |
Max value for each axis.
|
max[0] (Array Type) |
value | Array<Number> | Value for each axis. | 0 |