Widget:Radar: Difference between revisions

From Elwiki
mNo edit summary
mNo edit summary
Line 1: Line 1:
<div style="width: 100%; height: 100%;">
<div style="width: 100%; height: 100%;">
     <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="600" height="600" viewBox="-300 -300 600 600">
     <!--{$PI=3.141592653589793}-->
        <!--{$PI=3.141592653589793}-->
    <!--{nocache}-->
        <!--{nocache}-->
    <!--{$step=2*$PI/$dim}-->
        <!--{$step=2*$PI/$dim}-->
    <!--{for $i=1 to $dim}-->
        <!--{for $i=1 to $dim}-->
        <!--{$deg=$PI/2+($i-1)*$step}-->
            <!--{$deg=$PI/2+($i-1)*$step}-->
        <!--{math equation="cos(deg)" deg=$deg assign="x"}-->
            <!--{math equation="cos(deg)" deg=$deg assign="x"}-->
        <!--{math equation="-sin(deg)" deg=$deg assign="y"}-->
            <!--{math equation="-sin(deg)" deg=$deg assign="y"}-->
        <!--{append var="xs" value=$x index=$i}-->
            <!--{append var="xs" value=$x index=$i}-->
        <!--{append var="ys" value=$y index=$i}-->
            <!--{append var="ys" value=$y index=$i}-->
         <!--{$minx=min($xs)-200}-->
         <!--{/for}-->
        <!--{$maxx=max($xs)+200}-->
        <!--{$miny=min($ys)-50}-->
        <!--{$maxy=max($ys)+30}-->
        <!--{$dx=$maxx-$minx}-->
        <!--{$dy=$maxy-$miny}-->
    <!--{/for}-->
    <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="600" height="600" viewBox="<!--{$minx}--> <!--{$miny}--> <!--{$dx}--> <!--{$dy}-->">
       
         <polygon stroke="#ccc" fill="#eee" points="
         <polygon stroke="#ccc" fill="#eee" points="
             <!--{for $i=1 to $dim}-->
             <!--{for $i=1 to $dim}-->
Line 49: Line 56:
             <!--{/for}-->
             <!--{/for}-->
         "></polygon>
         "></polygon>
        <!--{/nocache}-->
     </svg>
     </svg>
    <!--{/nocache}-->
</div>
</div>

Revision as of 06:06, 29 May 2020

   <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="600" height="600" viewBox="   ">
       
       <polygon stroke="#ccc" fill="#eee" points="
       "></polygon>
       <polygon stroke="#ccc" fill="#fff" points="
       "></polygon>
       <polygon stroke="#ccc" fill="#eee" points="
       "></polygon>
       <polygon stroke="#ccc" fill="#fff" points="
       "></polygon>
       <polygon stroke="#ccc" fill="#eee" points="
       "></polygon>
       <line x1="0" y1="0" x2="" y2="" stroke="#ccc"></line>
       <text transform="translate()" fill="#000" text-anchor="middle"></text>
       <polygon stroke-width="0" fill="7f" points="
       "></polygon>
   </svg>