I am trying to do a grouped barchart in GTL. The problem is I want specific corporate colors for each group. In a non-grouped barchart I can use fillattrs=(color=yellow), it will not work with fillattrs=(color=yellow red) as it does in gbar.
Is there a way to easy change the color to the one I want? I have tried to plough through the documentation, but I do not find any helpful, just lot of descriptions of the inner life of templates and how to change other attributes. The problem is when I try these codes in my concept, it does not work.
Is there an easy way to change the colors in a grouped barchart (or other grouped graphs) in GTL.
Take a look at my paper "Secrets of the SG Procedures" (http://support.sas.com/resources/papers/proceedings09/324-2009.pdf). The SG procedure use GTL to create the output. In the paper, you will see some techniques for creating grouped bar charts. As for specifying the colors for the groups, you currently have to make an ODS style change for that. For example, let's assume you are using the "default" style with a bar chart, and I wanted to change your first three groups to red, green, and blue. The following code is the style change necessary:
define style styles.berga;
style GraphColors from GraphColors /
"gdata1" = red
"gdata2" = green
"gdata3" = blue
You can then specify the "berga" style on your ODS statement to pick up your new colors.
Generally speaking about stored processes, when you are turning "regular" SAS code into a stored process, your override statements (such as for STYLE or other template) must go BEFORE the %STPBEGIN instruction in the stored process code. So, for example, not only do you have to make sure that the style template and/or the graph template lives on the server environment in a location that is accessible to the stored process server or the workspace server; but, then you also need to issue an ODS PATH statement that points to the correct PATH for templates (on the server, not on your local machine) and then you may need to do something like this:
%global _odsdest _odsstyle _odsstylesheet;
...GTL step that uses graph template from above item store...
One warning -- if you are writing stored processes for the SAS Add-in for Microsoft Office or for EG, your style template should be honored assuming it is in the right location and accessible to the stored process. However, if you are writing stored processes for Web Report Studio, there is a possibility that WRS will not respect your style specification. WRS has it's own way of defining styles and may not use the style you set.
(Note that the information in the paper and handout refer to SAS 9.1.3 -- if you have SAS 9.2 and the Enterprise Intelligence Platform, you may want to work with Tech Support on your template question.)