<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: GTL for dashboards in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/270503#M9656</link>
    <description>&lt;P&gt;this looks great and thanks again.&lt;/P&gt;</description>
    <pubDate>Sat, 14 May 2016 11:12:24 GMT</pubDate>
    <dc:creator>jins</dc:creator>
    <dc:date>2016-05-14T11:12:24Z</dc:date>
    <item>
      <title>GTL for dashboards</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/269078#M9631</link>
      <description>&lt;P&gt;Can we create this dials as in&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/26/119.html" target="_blank"&gt;http://support.sas.com/kb/26/119.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;using GTL language?&lt;/P&gt;&lt;P&gt;Are there any sources which we can refer to?&lt;/P&gt;</description>
      <pubDate>Sun, 08 May 2016 20:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/269078#M9631</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2016-05-08T20:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: GTL for dashboards</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/269082#M9632</link>
      <description>&lt;P&gt;The simple answer is "Yes". &amp;nbsp;However, it&amp;nbsp;will need some work, and two ways come to mind. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the dials and ranges on the dials are fixed, the easiest would be to design the dials in Photoshop, and then just display the needle on the dial using an overlaid plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However if each dial or KPI design is varying, and data ranges change, then you would need to draw the gauge itself using plot statements. &amp;nbsp;Can be done (justllike the example) using different plot statement, including&amp;nbsp;the POLYGON plot statement.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 00:11:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/269082#M9632</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-05-09T00:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: GTL for dashboards</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/269108#M9633</link>
      <description>&lt;P&gt;I am working on it...here is what I have so far. &amp;nbsp;I will add the ticks and the needle shortly and attach&amp;nbsp;the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3084i4BBB322C2C20BA16/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Tach.png" title="Tach.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 05:47:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/269108#M9633</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-05-09T05:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: GTL for dashboards</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/269139#M9634</link>
      <description>&lt;P&gt;Sanjay,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This looks impressive and i am keen to look at the code. Thanks&amp;nbsp;a lot!!&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2016 10:42:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/269139#M9634</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2016-05-09T10:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: GTL for dashboards</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/269333#M9638</link>
      <description>&lt;P&gt;Here is the first cut. &amp;nbsp;This is not "Macro-ized" yet. &amp;nbsp;This POC has fixed ranges that need to be made dynamic. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am also awaiting some help from out UX experts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/3105i0896517E4783FE58/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Tach_2C.png" title="Tach_2C.png" /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let gpath='.';
%let dpi=200;
ods listing gpath=&amp;amp;gpath image_dpi=&amp;amp;dpi;
ods html close;

data Tach;
  length lbl1 lbl2 vlbl $5;
  pi=constant ("PI");

  /*--Outer ring--*/
  start=0; end=360; step=2; off=90;
  ro=100; 
  do i=start to end+step by step;
    x1=ro*cos((i+off)*pi/180);
        y1=-ro*sin((i+off)*pi/180);
        output;
  end;

  /*--Inner Green segment--*/
  x1=.; y1=.;
  group=1;
  startAngle=40;
  start=startAngle; end=200; step=2; off=90;
  r=80; r2=70; rlbl=62;
  do i=start to end by step;
    x2=r*cos((i+off)*pi/180);
        y2=-r*sin((i+off)*pi/180);
        if mod(i,20) = 0 then do;
      x3=r2*cos((i+off)*pi/180);
          y3=-r2*sin((i+off)*pi/180);
      xlbl=rlbl*cos((i+off)*pi/180);
          ylbl=-rlbl*sin((i+off)*pi/180);
          if mod(i,40) = 0 then lbl1=put((i-startAngle)/4,2.0);
        end;
        else call missing (x3, y3, lbl1);
        output;
  end;

  /*--Inner yellow segment--*/
  start=200; end=240;
  group=2;
  do i=start to end by step;
    x2=r*cos((i+off)*pi/180);
        y2=-r*sin((i+off)*pi/180);
        if mod(i,20) = 0 then do;
      x3=r2*cos((i+off)*pi/180);
          y3=-r2*sin((i+off)*pi/180);
      xlbl=rlbl*cos((i+off)*pi/180);
          ylbl=-rlbl*sin((i+off)*pi/180);
          if mod(i,40) = 0 then lbl1=put((i-startAngle)/4,2.0);;
        end;
        else call missing (x3, y3, lbl1);
        output;
  end;

  /*--Inner red segment--*/
  start=240; end=320;
  group=3;
  do i=start to end by step;
    x2=r*cos((i+off)*pi/180);
        y2=-r*sin((i+off)*pi/180);
        if mod(i,20) = 0 then do;
      x3=r2*cos((i+off)*pi/180);
          y3=-r2*sin((i+off)*pi/180);
      xlbl=rlbl*cos((i+off)*pi/180);
          ylbl=-rlbl*sin((i+off)*pi/180);
          if mod(i,40) = 0 then lbl1=put((i-startAngle)/4,2.0);;
        end;
        else call missing (x3, y3, lbl1);
        output;
  end;

  /*--Value--*/
  call missing (x1, y1, x2, y2, x3, y3, xlbl, ylbl, lbl1 );
  value=20;  
  vlbl=put(value,2.0);
  xv=0; yv=-60;
  output;

  /*--Needle--*/
  xn1=0; yn1=0;
  xn2=r*cos((4*value+startAngle+off)*pi/180);
  yn2=-r*sin((4*value+startAngle+off)*pi/180);
  output;

  /*--Hub--*/
  xh=0; yh=0; output;
run;
/*ods html;*/
/*proc print;run;*/
/*ods html close;*/

ods graphics / reset attrpriority=color noborder width=2in height=2in imagename='Tach_2C';
proc sgplot data=tach aspect=1 nocycleattrs noautolegend noborder subpixel;
  styleattrs datacontrastcolors=(lightgreen yellow red);
  /*--Outer ring--*/
  series x=x1 y=y1 / lineattrs=(thickness=12 color=black);
  series x=x1 y=y1 / lineattrs=(thickness=10 color=lightblue);

  /*--Inner Green Ring--*/
  series x=x2 y=y2 / group=group lineattrs=(thickness=8 color=black);
  series x=x2 y=y2 / group=group lineattrs=(thickness=6);

  /*--Tick marks--*/
  vector x=x2 y=y2 / xorigin=x3 yorigin=y3 noarrowheads;

  /*--Tick values--*/
  text x=xlbl y=ylbl text=lbl1 / position=center;

  /*--Display value--*/
  text x=xv y=yv text=vlbl / position=center textattrs=(size=16pt weight=normal);

  /*--Display Needle--*/
  vector x=xn2 y=yn2 / xorigin=xn1 yorigin=yn1 lineattrs=(thickness=2)
         arrowheadshape=barbed;

  /*--Display Hub--*/
  scatter x=xh y=yh / markerattrs=(size=20 symbol=circlefilled color=gray)
          filledoutlinedmarkers dataskin=pressed 
          markerfillattrs=(color=silver) markeroutlineattrs=(thickness=3);

  xaxis display=none;
  yaxis display=none;
run;
    
    
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 May 2016 04:21:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/269333#M9638</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-05-10T04:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: GTL for dashboards</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/270476#M9655</link>
      <description>&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2016/05/13/dial-kpi-using-sgplot/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/2016/05/13/dial-kpi-using-sgplot/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 May 2016 02:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/270476#M9655</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-05-14T02:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: GTL for dashboards</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/270503#M9656</link>
      <description>&lt;P&gt;this looks great and thanks again.&lt;/P&gt;</description>
      <pubDate>Sat, 14 May 2016 11:12:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/GTL-for-dashboards/m-p/270503#M9656</guid>
      <dc:creator>jins</dc:creator>
      <dc:date>2016-05-14T11:12:24Z</dc:date>
    </item>
  </channel>
</rss>

