The order of the color swatches in the legend are based on data order of the values, but you can order the legend alphabetically. The order of the data is different, but the colors are assigned by the value of the group variable. Note, in second case, the missing value of 'A" is removed. The first graph uses Value x Loc and Grp1. An圜hart 5.0 vs 5. New engine allows using larger data sets without significant time lags, and this applies to all chart types, including AnyMap extension. The Discrete Attr Map is like a format, where you can specify the colors to be used by the VALUE of the group variable. An圜hart 5.1 is based on absolutely new charting engine, which made possible to improve performance and decrease rendering time and update time dramatically. This feature is designed for just this situation. ![]() The colors are determined by the value of the group variable, not by its position in the data. With SAS 9.3, you can use the SGPLOT procedure with Discrete Attributes Map to get the result you want. I am sure there is a way using GCHART, but I will let other address that solution. Not sure I can do this in PROC GCHART, if not, are there any easy ways to do this? I searched online and maybe rangeattrmap could do it (need a simple example for my case have read some examples under SAS docs but not easy to understand). This code will not do the job when the data table does not have all three range of values if you only have valueT below 50 and above 80, then the first one will be red but values over 80 of locations will show yellow (correct values should be Green). Reflabel=("Action Limit" "Goal") run quit Vbar Location / discrete sumvar=ValueT sum however, for my data table, sometimes it has values all over 80, some times values are all above 50, then if i use the pattern to assign the color to the bar, there will be a problem. So I have a simple data table which has two columns (vars): Location and Value Location could be three different values and value is between 0 to 1 I am trying to use PROC GCHART to make a bar chart and the X axis is Location and Y axis is ValueT in addition, I want to assign the bar chart color based on the ValueT if valueT = 80, then green, I also create a new variable called barcolor to assign the value as 1 2 3 to represent red yellow green. P=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.:FLOW_FLASH_CHART_R#REGION_ID#"įlashVars="XMLFile=#HOST#apex_util.flash2?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.I am trying to create a bar chart and think it should be a really really simple task ( you can do this probably in excel under 2 mins or in JMP under 2 mins) but seems like in SAS it is difficult. Param name="wmode" value="transparent">param name="FlashVars" value="XMLFile=#HOST#apex_util.flash2?p=&APP_ID.:&APP_PAGE_ID.:&APP_SESSION.:FLOW_FLASH_CHART_R#REGION_ID#">Įmbed src="#IMAGE_PREFIX#flashchart/#CHART_TYPE#.swf?XMLFile=#HOST#apex_util.flash? Param name="allowNetworking" value="all"> Param name="allowScriptAccess" value="sameDomain"> Param name="movie" value="#IMAGE_PREFIX#flashchart/swf/An圜hart.swf" SELECT NULL LINK, ENAME LABEL, SAL VALUE FROM EMP ORDER BY ENAME I wouldn't advice to immediately change all your Charts to Anychart 4, but it is nice to play with! I guess you can't create all the Charts you want, but you can get some nice things like the picture to the left - without any extra costs. I'll do another post when that goes public. &APP_ID.:1: should be replaced by &APP_ID.:&APP_PAGE_ID.: Now it works perfect - no need for refreshing the chart anymore!īTW I am working on a more extensive example on, showing more types of charts. ![]() Update (20/5): The #1085 Error was caused by a wrong "FlashVars" parameter. This setting tells Anychart 4 to "understand" that XML. Now replace the standard Chart XML with the very minimal setting of:Įspecially the use_anychart3_data_model="true" is important - as APEX generates Anychart 3 type XML. Now make let's make some changes in the generated Region Source to use Anychart 4:Ĭhange to and to twice - once in the section and once in the section. Of course we could wait for APEX 4.0 or go for Anycharts 5, using the Anychart Integration Kit, but we love a quick and more cost neutral (as in ' free') solution.Ĭreate a simple chart using the "SELECT NULL LINK, ENAME LABEL, SAL VALUE FROM EMP ORDER BY ENAME" query. These charts look better than the regular ones, and we - my colleague Rutger and I - started to investigate the options for enhancing the regular charts. The charts you create with Interactive Reports use Anycharts 4. With the current APEX version you can create nice looking Charts using Anycharts 3.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |