BookmarkSubscribeRSS Feed
DinoPut
Obsidian | Level 7

Hi

 

I have been trying to generate a 2-panel plot with 18 lines. I would like to have a separate color for each of the lines and defined accordingly in the SAS Template. But I have been getting the following warning in the log and I was hoping that I could get some help on this:

WARNING: Could not locate parent style element "Graphdata13" for element "mystyle.Graphdata13".
WARNING: Could not locate parent style element "Graphdata14" for element "mystyle.Graphdata14".
WARNING: Could not locate parent style element "Graphdata15" for element "mystyle.Graphdata15".
WARNING: Could not locate parent style element "Graphdata16" for element "mystyle.Graphdata16".
WARNING: Could not locate parent style element "Graphdata17" for element "mystyle.Graphdata17".

 

Template:

 


PROC TEMPLATE;
define style mystyle;
parent=styles.rtf;
Style Header from Header / Background = white /*FONT_WEIGHT=medium*/;
Style RowHeader from RowHeader / Background = WHITE /*FONT_WEIGHT=medium*/;

style GraphFonts from graphfonts/
'GraphDataFont' = ("Times New Roman",10pt, bold)
'GraphUnicodeFont' = ("Times New Roman",10pt, bold)
'GraphValueFont' = ("Times New Roman",8pt, bold)
'GraphLabelFont' = ("Times New Roman",6pt,bold)
'GraphFootnoteFont' = ("Times New Roman",10pt,normal)
'GraphTitleFont' = ("Times New Roman",10pt,bold)
'GraphAnnoFont' = ("Times New Roman",10pt, bold);


CLASS GraphValueText /COLOR=BLACK;
CLASS GraphDataText /COLOR=BLACK;
CLASS GraphBorderLines/COLOR=BLACK;
CLASS GraphAxisLines/ContrastColor=BLACK;
CLASS GraphLabelText/COLOR=BLACK;
CLASS GraphDataDefault/COLOR=BLACK ContrastColor=BLACK;

 

CLASS GraphAnnoLine/ContrastColor=BLACK;
CLASS GraphAnnoText/COLOR=BLACK;
CLASS GraphConnectLine/ContrastColor=BLACK;

%do i =1 %to &max;
style Graphdata&i from Graphdata&i/ contrastcolor=&&color&i linestyle=&&line&i Markersymbol="&&symbol&i";
%end;
style GraphError /LineThickness = 1px;

class graphwalls /
frameborder=on
linestyle=1
linethickness=1px
backgroundcolor=GraphColors("gwalls")
contrastcolor= black;

class graphaxislines /
linestyle=1
linethickness=1px
contrastcolor=black;


class table/outputwidth=100%;
replace Body from Document / textalign =center
topmargin = 0.05 in
bottommargin = 0.05 in
rightmargin = 0.05 in
leftmargin = 0.05 in;
replace fonts /
'TitleFont' = ("Times New Roman",10pt,BOLD)
'TitleFont2' = ("Times New Roman",10pt,normal)
'StrongFont' = ("Times New Roman",10pt,BOLD)
'EmphasisFont' = ("Times New Roman",10pt,BOLD)
'FixedEmphasisFont' = ("Times New Roman",10pt,BOLD)
'FixedStrongFont' = ("Times New Roman",10pt,BOLD)
'FixedHeadingFont' = ("Times New Roman",10pt,BOLD)
'BatchFixedFont' = ("Times New Roman, Times New Roman",10pt)
'FixedFont' = ("Times New Roman",10pt)
'headingEmphasisFont' = ("Times New Roman",10pt,BOLD)
'headingFont' = ("Times New Roman",10pt,BOLD)
'docFont' = ("Times New Roman",10pt);
class Table/
bordercollapse = separate
backgroundcolor = colors('tablebg')
BACKGROUND=_UNDEF_
textalign =center
rules = all
frame =BOX
borderspacing =1
bordercolor = colors('tableborder')
borderwidth =1
bordertopwidth=1
bordertopcolor=black
borderbottomwidth=1
borderbottomcolor=black ;

class Data /
color = colors('datafg')
backgroundcolor = colors('databg')
textalign =center ;

Style Systemfooter from Systemfooter /
background=white
borderbottomcolor=white
bordertopcolor=black
borderbottomwidth=2
background=_undef_
bordertopwidth=0
textalign = center
font =fonts('TitleFont2') ;
END;
run;

 

 

Thanks in advance

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:
If you look in the styles.default template, you'll see that the GraphData elements only go from 1-12. So the minute you tried to inherit with a "from GraphData13" or "from GraphData14" you would start to encounter problems.

I am assuming that you have this in a macro program definition. My recommendation would be to use a CLASS statement (which does not need a FROM) instead of your current loop, which uses STYLE and FROM.

Cynthia

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1036 views
  • 4 likes
  • 2 in conversation