<?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: Chart creation in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/377646#M13027</link>
    <description>&lt;P&gt;To make it simple, assume you've the data as follows in the SAS program and I just wanted to create a bar chart as shown below. Appreciate if could help me with the coding part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input week $ L2 L3 Grant_total;
datalines;
week1 4 . 4
week2 7 4 11
week3 5 1 1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10417i71C579DDAF81080A/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Pivot.png" title="Pivot.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2017 05:10:07 GMT</pubDate>
    <dc:creator>Babloo</dc:creator>
    <dc:date>2017-07-20T05:10:07Z</dc:date>
    <item>
      <title>Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/377551#M13023</link>
      <description>&lt;P&gt;I've a data as follows. Now I've to create a pivot table via SAS program to know graphically how many tickets were worked by L2 and L3 as per chart below. I did tried this using proc summary and proc transpose, but I'm unable to get this work done using those procs. Appreciate if someone of you help me to achive this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="384"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="116"&gt;Count of L2/L3&lt;/TD&gt;
&lt;TD width="114"&gt;Column Labels&lt;/TD&gt;
&lt;TD width="75"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD width="79"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Row Labels&lt;/TD&gt;
&lt;TD&gt;L2&lt;/TD&gt;
&lt;TD&gt;L3&lt;/TD&gt;
&lt;TD&gt;Grand Total&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Week 1_Jul-3-9&lt;/TD&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Week 2_Jul-10-16&lt;/TD&gt;
&lt;TD&gt;7&lt;/TD&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;11&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Week 3_Jul 17-23&lt;/TD&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Grand Total&lt;/TD&gt;
&lt;TD&gt;16&lt;/TD&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;21&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10413i49FCCA8F6E0254E2/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Pivot.png" title="Pivot.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 19:40:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/377551#M13023</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2017-07-19T19:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/377604#M13024</link>
      <description>&lt;P&gt;Proc Summary should work, what do you have so far in terms of code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, we see something, but it's not what you want and we don't know what you have so we don't have a lot of information here. You need to detail your question a lot more.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 21:18:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/377604#M13024</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-19T21:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/377646#M13027</link>
      <description>&lt;P&gt;To make it simple, assume you've the data as follows in the SAS program and I just wanted to create a bar chart as shown below. Appreciate if could help me with the coding part.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input week $ L2 L3 Grant_total;
datalines;
week1 4 . 4
week2 7 4 11
week3 5 1 1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10417i71C579DDAF81080A/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Pivot.png" title="Pivot.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 05:10:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/377646#M13027</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2017-07-20T05:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/377735#M13028</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If you structure your data a bit differently -- so you have a "TYPE" variable that can be used for grouping and you only have one row for every type/week combo, like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data chart;
  length Weekval $30;
  infile datalines dlm=',' dsd;
  input Weekval $ Amount Type $;
return;
datalines;
"Week 1_Jul-3-9", 	4, L2    
"Week 2_Jul-10-16",	7, L2   
"Week 3_Jul 17-23",	5,  L2
"Week 1_Jul-3-9", 	 ,  L3    
"Week 2_Jul-10-16",	4,  L3
"Week 3_Jul 17-23",	1,  L3
; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then it would be a very simple SGPLOT to do a VBAR chart.&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10423i04A371E11F598EE9/image-size/original?v=1.0&amp;amp;px=-1" alt="chart_example.png" title="chart_example.png" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 12:54:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/377735#M13028</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-07-20T12:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378017#M13055</link>
      <description>&lt;P&gt;Great! It worked like a charm. Now I want to write a code to send an email to our group which has this chart and also the dataset 'Chart'.&amp;nbsp;So that end user can understand the data and the chart. I know we can achive this using filename email statement. but I'm not certain how to do that. Appreciate if someone of you help me here.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 06:57:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378017#M13055</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2017-07-21T06:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378122#M13065</link>
      <description>Hi:&lt;BR /&gt;  I recommend you search the Tech Support notes for how to use the FILENAME email engine. The easiest thing would be for you to make an RTF or PDF file that contains your table and graph and then email them as an attachment. &lt;BR /&gt;&lt;BR /&gt;  The basic syntax is shown on page 7 here: &lt;A href="http://support.sas.com/resources/papers/proceedings11/300-2011.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings11/300-2011.pdf&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;However, your system administrator has to turn on some SAS configuration options before emailing will work for you. So looking for Tech Support notes will help you figure out which options you need to talk to your SAS Administrator about.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Fri, 21 Jul 2017 13:17:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378122#M13065</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-07-21T13:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378242#M13080</link>
      <description>&lt;P&gt;Emailing is working for me. Is there any way to send an email which has chart (bar chart) and dataset in body of the email instead of attachment using Filename statement?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 16:41:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378242#M13080</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2017-07-21T16:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378359#M13091</link>
      <description>For that, you would need to email as HTML, by putting the table and the image into the body of the email. The challenge with that approach is that some companies do not let you SEND HTML messages created by a program and even if you can SEND the HTML, other companies do not let their employees RECEIVE HTML content, but instead convert the HTML to plain text. &lt;BR /&gt;&lt;BR /&gt;So you first have to check whether you can even send HTML messages and then you have to use the right HTML destination so that the image gets embedded in the HTML.&lt;BR /&gt;&lt;BR /&gt;ODS HTML produces HTML 4.0 and your images in that case are contained in external files and pointed to with an &amp;lt;IMG&amp;gt; tag, so they are not really "embedded". If you use ODS HTML5, then you can create an HTML5 file with embedded images, but again, you need to check whether you can even send HTML5.&lt;BR /&gt;&lt;BR /&gt;Here are some previous postings relevant to your question:&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/sending-html-output-via-email-with-pictures/td-p/126812" target="_blank"&gt;https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/sending-html-output-via-email-with-pictures/td-p/126812&lt;/A&gt; and here's a blog post with an example of HTML5 usage: &lt;A href="http://blogs.sas.com/content/sastraining/2013/11/06/sas-9-4-has-a-new-way-to-send-interactive-graphs-in-email/" target="_blank"&gt;http://blogs.sas.com/content/sastraining/2013/11/06/sas-9-4-has-a-new-way-to-send-interactive-graphs-in-email/&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;cynthia</description>
      <pubDate>Sat, 22 Jul 2017 01:48:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378359#M13091</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-07-22T01:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378394#M13092</link>
      <description>Colors in the bar chart is getting modified when it has been send as an&lt;BR /&gt;email with attachment. E.g. bar chart is in blue and red colour in  output&lt;BR /&gt;from SAS E.G and I except the same colour in the chart when it has been&lt;BR /&gt;send as an attachment via Filename Email statement. But the colour I see in&lt;BR /&gt;attachment is Yellow and Orange.&lt;BR /&gt;&lt;BR /&gt;Appreciate if someone guide me to control the colour in the attachment.&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Sat, 22 Jul 2017 09:45:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378394#M13092</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2017-07-22T09:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378441#M13093</link>
      <description>Hi:&lt;BR /&gt;  Sounds like EG is using a different style template than the style you used to create your HTML file for sending. Without seeing your code and your STYLE= option, it is hard to comment constructively.&lt;BR /&gt;&lt;BR /&gt;It may be as simple as adding STYLE=HTMLBLUE or STYLE=EGDEFAULT to your ODS HTML or ODS HTML5 statements (depending on which destination you used to create your HTML file).&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Sat, 22 Jul 2017 16:35:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378441#M13093</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-07-22T16:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378498#M13094</link>
      <description>I created a .rtf file and it has been send as an attachment. Appreciate if&lt;BR /&gt;you could help me with the syntax for the same to control the colour in the&lt;BR /&gt;chart.&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Sun, 23 Jul 2017 06:01:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378498#M13094</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2017-07-23T06:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Chart creation</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378717#M13098</link>
      <description>&lt;P&gt;Hi, as I explained, using STYLE= in your ODS statement will change the style:&lt;BR /&gt;&lt;BR /&gt; For example:&lt;BR /&gt;&lt;FONT size="3" face="courier new,courier"&gt;&lt;STRONG&gt;ods rtf file='c:\temp\myfile.rtf' &lt;FONT color="#0000FF"&gt;style=journal&lt;/FONT&gt;;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;**... your code ...;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;ods rtf close;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Where I have style=journal, you can change to any of the SAS-supplied styles you want: &lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;style=journal&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;style=pearl&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;style=rtf&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;style=htmlblue&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;style=sasweb&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;... to name just a few --you'll have to experiment to see which style you want/like. But the bottom line is that the STYLE= option will go on the ODS statement -- that comes with colors predefined for grouping when you are doing graphs.&lt;BR /&gt;&lt;BR /&gt;If you want to change the colors used, you can either:&lt;BR /&gt;1) change the style you use with the STYLE= option&lt;BR /&gt;2) use internal SGPLOT syntax for changing bar colors (you will find this in the documentation)&lt;BR /&gt;3) use an attribute map (part of ODS GRAPHICS) to change the colors (there are examples of this in the doc and in previous forum postings)&lt;BR /&gt;&lt;BR /&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 15:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Chart-creation/m-p/378717#M13098</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-07-24T15:12:16Z</dc:date>
    </item>
  </channel>
</rss>

