<?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: Custom user-defined style-element for TEXTATTRS option in ENTRYTITLE statement does not work in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Custom-user-defined-style-element-for-TEXTATTRS-option-in/m-p/815650#M22869</link>
    <description>Thanks, what a bummer...</description>
    <pubDate>Mon, 30 May 2022 07:45:49 GMT</pubDate>
    <dc:creator>wmil</dc:creator>
    <dc:date>2022-05-30T07:45:49Z</dc:date>
    <item>
      <title>Custom user-defined style-element for TEXTATTRS option in ENTRYTITLE statement does not work</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Custom-user-defined-style-element-for-TEXTATTRS-option-in/m-p/814824#M22851</link>
      <description>&lt;P&gt;(see code at the bottom)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I build my own custom style ('mystyle') for the creation of graphs, but I don't seem to get my own user-defined style elements to work.&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;&lt;U&gt;exactly&lt;/U&gt; the same syntax as used in the styles.default template source code, but even though my custom style element seems to be defined just fine, it drops following note and indeed uses the default style element (in this case 'GraphTitleText'):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;NOTE: The style element 'mygraphtitletext' in the option TEXTATTRS is invalid.  The default will be used.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I know there are several other alternatives that I could use (other than defining a custom style), e.g. changing the style element&amp;nbsp;GraphTitleText itself in my custom style, but since I will be using this style in many other graphs and parts of a much more complex program, I really want to get this done in a user-defined style element.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc template;
   define style mystyle;
   parent=styles.default;
   style myGraphFonts /
      'myGraphTitleFont' = ("&amp;lt;sans-serif&amp;gt;, &amp;lt;MTsans-serif&amp;gt;",20pt,bold);
   style myGraphColors /
      'mygtext' = cx00FFFF;
   style myGraphTitleText /
      font = myGraphFonts('myGraphTitleFont')
      color = myGraphColors('mygtext');
   end;
run;

ods listing style=mystyle;

proc template;
   define statgraph histogram;
      begingraph;
         entrytitle "title 1 test" / textattrs=myGraphTitleText;
         entrytitle "title 2 test" / textattrs=GraphTitleText;
         layout overlay;
            histogram weight;
         endlayout;
      endgraph;
   end;
run;

proc sgrender data=sashelp.class
   template=histogram;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="SGRender7.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71729iDF8D5E78FCE83B2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SGRender7.png" alt="SGRender7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 07:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Custom-user-defined-style-element-for-TEXTATTRS-option-in/m-p/814824#M22851</guid>
      <dc:creator>wmil</dc:creator>
      <dc:date>2022-05-24T07:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Custom user-defined style-element for TEXTATTRS option in ENTRYTITLE statement does not work</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Custom-user-defined-style-element-for-TEXTATTRS-option-in/m-p/814920#M22852</link>
      <description>&lt;P&gt;Currently, you cannot create a new style element in your own style -- you can only override the supported style elements. That is why the system generated the log message..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 17:16:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Custom-user-defined-style-element-for-TEXTATTRS-option-in/m-p/814920#M22852</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2022-05-24T17:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom user-defined style-element for TEXTATTRS option in ENTRYTITLE statement does not work</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Custom-user-defined-style-element-for-TEXTATTRS-option-in/m-p/815650#M22869</link>
      <description>Thanks, what a bummer...</description>
      <pubDate>Mon, 30 May 2022 07:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Custom-user-defined-style-element-for-TEXTATTRS-option-in/m-p/815650#M22869</guid>
      <dc:creator>wmil</dc:creator>
      <dc:date>2022-05-30T07:45:49Z</dc:date>
    </item>
  </channel>
</rss>

