06-10-2016 05:38 PM
What am I missing? I'm putting a bar chart together with a line graph, both have months for the X axis, so that totally works. I'm getting exactly what I want, except I'm getting no legend, I was expecting a legend that distinguished the different lines from the series plot.
define statgraph vbar_line;
dynamic _title _Xbar _Ybar _xseries _yseries _seriesGroup _seriesTitle;
layout overlay/xaxisopts=(type=time timeopts=(interval=quarter TICKVALUEFORMAT=MONYY5.))
barchart x=_xbar y=_ybar/ yaxis=y;
seriesplot x=_xseries y=_yseries / group=_seriesGroup name="series" yaxis=y2
06-13-2016 01:08 PM
Did you check for log messages? If you have a large number of groups, the legend may get too big to display by default. You can increase the space allowed for the legend. Please include full program with data that can be shared so we can run the case and see what is happening.
06-10-2016 05:59 PM
You might want to show the code of SGRender used with the template, and possibly some example data.
I am assuming you get no warnings or errors when building the template.
06-15-2016 11:05 AM
I'm pretty sure the problem is too many groups. I only have 5 lines, I only calculated the percent for the lines for the 5 groups that I need, but it appears SAS is trying to put all the groups in the legend even though there are no lines drawn for them.
I'm having to alter the data a lot, but I'm able to get what I need by eliminating the grouping variable on the rows for data that don't contribute to the 5 lines I want (but I can't delete the rows of data wholly because they contribute to the bar chart)
Thanks, no errors in the log, this was a tricky one, I figured 5 should be able to fit in the legend, didn't know it was trying to all the other groups.