Widget:Radar: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 15: Line 15:
| '''fontfamily''' || ''String'' || Name of font(s) || Microsoft YaHei
| '''fontfamily''' || ''String'' || Name of font(s) || Microsoft YaHei
|-
|-
| '''fontsize''' || ''Number'' || Font size || 18
| '''fontsize''' || ''Number'' || Font size || 28
|-
|-
| '''color''' || ''HexColor'' (#RRGGBB format only) || The color for the radar area ||
| '''color''' || ''HexColor'' (#RRGGBB format only) || The color for the radar area ||
Line 62: Line 62:
     <!--{$dx=$x2-$x1}-->
     <!--{$dx=$x2-$x1}-->
     <!--{$dy=$y2-$y1}-->
     <!--{$dy=$y2-$y1}-->
    <!--{$fontcorrection=$fontsize|default:28}-->
     <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="<!--{$x1}--> <!--{$y1}--> <!--{$dx}--> <!--{$dy}-->" style="width: <!--{$size|default:'100%'}-->">
     <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="<!--{$x1}--> <!--{$y1}--> <!--{$dx}--> <!--{$dy}-->" style="width: <!--{$size|default:'100%'}-->">
         <polygon stroke="#ccc" fill="#eee" points="
         <polygon stroke="#ccc" fill="#eee" points="
Line 92: Line 93:


         <text  
         <text  
             transform="translate(<!--{($xs[$i]*230)|cat:','|cat:($ys[$i]*230)}-->)"
             transform="
            translate(0,<!--{$fontcorrection/2}-->)
            translate(<!--{($xs[$i]*230)|cat:','|cat:($ys[$i]*230)}-->)
            "
             fill="#000"
             fill="#000"
             text-anchor="middle"
             text-anchor="middle"
             font-size="<!--{$fontsize|default:18}-->"
             font-size="<!--{$fontcorrection}-->"
             font-family="<!--{$fontfamily|default:'Microsoft YaHei'}-->">
             font-family="<!--{$fontfamily|default:'Microsoft YaHei'}-->">
             <!--{$label[$i-1]|default:''|escape:'html'}-->
             <!--{$label[$i-1]|default:''|escape:'html'}-->