- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 08-24-2010 05:23 PM
(1453 views)
Hi all,
Using a sgplot to display 3 bars. I want each bar to link to a different URL. For some reason my sgplot only creates the link for the lasst bar.
Below is my code. The 3rd bar, reponse=Handled, is the only one working.
proc sgplot data=Current_Pipeline (where=(Week_Ending_On>today()-15*7 and Week_Ending_On
vbar Week_Ending_On/ response=Created nooutline barwidth=.9 fillattrs=(color=cxA6D96A) datalabel url=urlString;
vbar Week_Ending_On/ response=StillOpen nooutline barwidth=.9 fillattrs=(color=black) datalabel url=urlOpen;
vbar Week_Ending_On/ response=Handled nooutline barwidth=.9 fillattrs=(color=cxF46D43) datalabel url=urlHandled;
yaxis display=(nolabel) ;
xaxis display=(nolabel) grid;
keylegend /location =inside position=topright noborder location=outside ;
format Week_Ending_On mmddyy5.;
run;
Using a sgplot to display 3 bars. I want each bar to link to a different URL. For some reason my sgplot only creates the link for the lasst bar.
Below is my code. The 3rd bar, reponse=Handled, is the only one working.
proc sgplot data=Current_Pipeline (where=(Week_Ending_On>today()-15*7 and Week_Ending_On
vbar Week_Ending_On/ response=StillOpen nooutline barwidth=.9 fillattrs=(color=black) datalabel url=urlOpen;
vbar Week_Ending_On/ response=Handled nooutline barwidth=.9 fillattrs=(color=cxF46D43) datalabel url=urlHandled;
yaxis display=(nolabel) ;
xaxis display=(nolabel) grid;
keylegend /location =inside position=topright noborder location=outside ;
format Week_Ending_On mmddyy5.;
run;
5 REPLIES 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hey Jaime,
Currently, the categorical charts (bar, line, and dot) are able to use only one URL column per graph. However, if I interpret your intent correctly, you should be able to combine your three URL columns into the same column and reference that column from all three bar chart statements. Let me know if that works for you.
Thanks!
Dan
Currently, the categorical charts (bar, line, and dot) are able to use only one URL column per graph. However, if I interpret your intent correctly, you should be able to combine your three URL columns into the same column and reference that column from all three bar chart statements. Let me know if that works for you.
Thanks!
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
Remember that when you post code to the forum anything related to HTML tags can throw off the posting mechanism and truncate your post (anything meaning < and > symbols -- which are also part of HTML tags).
This previous forum posting explains how to protect your symbols
http://support.sas.com/forums/thread.jspa?messageID=27609毙
Using < for < and > for > as well as how to use se the [pre] and [/pre] tags around your code and output in order to maintain indenting and spacing.
It's not clear to me what's up with your bars -- are you overlaying the bars or having them side-by-side? It seems as though the last URL is the one used -- which is what I would expect if you were overlaying the bars, one on top of the other.
cynthia
Remember that when you post code to the forum anything related to HTML tags can throw off the posting mechanism and truncate your post (anything meaning < and > symbols -- which are also part of HTML tags).
This previous forum posting explains how to protect your symbols
http://support.sas.com/forums/thread.jspa?messageID=27609毙
Using < for < and > for > as well as how to use se the [pre] and [/pre] tags around your code and output in order to maintain indenting and spacing.
It's not clear to me what's up with your bars -- are you overlaying the bars or having them side-by-side? It seems as though the last URL is the one used -- which is what I would expect if you were overlaying the bars, one on top of the other.
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks all,
As per DanH's post, I think I might have to listen to Robert and dust off the old gchart procedure. The only problem is that I ned to overlay the bars. I dont remember if gchart allows that.
As per DanH's post, I think I might have to listen to Robert and dust off the old gchart procedure. The only problem is that I ned to overlay the bars. I dont remember if gchart allows that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Here's an example where I use gchart, and produce "overlapping" bars...
http://robslink.com/SAS/democd29/robslink.htm
http://robslink.com/SAS/democd29/robslink_info.htm
Note that I let gchart draw the first bar (back-most bar), and then I annotate the overlapping bars. You can control the charttip/drilldowns of the gchart bars using gchart vbar's html= option, and the charttip/drilldowns of the overlapping annotated bars using the 'html' variable in the annotate data set.
http://robslink.com/SAS/democd29/robslink.htm
http://robslink.com/SAS/democd29/robslink_info.htm
Note that I let gchart draw the first bar (back-most bar), and then I annotate the overlapping bars. You can control the charttip/drilldowns of the gchart bars using gchart vbar's html= option, and the charttip/drilldowns of the overlapping annotated bars using the 'html' variable in the annotate data set.