Ryan Sullivan Posted August 25, 2021 Share Posted August 25, 2021 Hi, Im trying to sort a stacked bar chart in Designer based on the total measure. But when I do that it splits up each discrete bar (see below): ENGINE INT CACHE SET ON SET PAGE-NUM=NOLEAD -DEFAULTH &WF_HTMLENCODE=OFF; SET HTMLENCODE=&WF_HTMLENCODE SET ARGRAPHENGINE=JSCHART -DEFAULTH &WF_EMPTYREPORT=ON; SET EMPTYREPORT=&WF_EMPTYREPORT SET EMBEDHEADING=ON SET GRAPHDEFAULT=OFF -DEFAULTH &WF_ARVERSION=1; SET ARVERSION=&WF_ARVERSION -DEFAULTH &WF_STYLE_UNITS=PIXELS; -DEFAULTH &WF_STYLE_HEIGHT=405.0; -DEFAULTH &WF_STYLE_WIDTH=770.0; -DEFAULTH &WF_TITLE=WebFOCUS Report; GRAPH FILE transmetric/finalapps -* Created by Info Assist for Graph SUM CNT.FINALAPPS.FINALAPPS.UNIQUECANDIDATE/I9 BY FINALAPPS.FINALAPPS.LASTAPPDATE_QUARTER BY TOTAL HIGHEST CNT.FINALAPPS.FINALAPPS.UNIQUECANDIDATE NOPRINT BY FINALAPPS.FINALAPPS.STATE ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET VZERO OFF ON GRAPH SET GRWIDTH 1 ON GRAPH SET UNITS &WF_STYLE_UNITS ON GRAPH SET HAXIS &WF_STYLE_WIDTH ON GRAPH SET VAXIS &WF_STYLE_HEIGHT ON GRAPH SET LOOKGRAPH BAR ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE * INCLUDE=IBFS:/WFC/Global/Themes/Standard/Default/theme.sty,$ TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $ TYPE=DATA, COLUMN=N1, BUCKET=color, $ TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $ TYPE=DATA, COLUMN=N3, BUCKET=x-axis, $ TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $ *GRAPH_SCRIPT *GRAPH_JS_FINAL blaProperties: { seriesLayout: stacked, orientation: horizontal }, agnosticSettings: { chartTypeFullName: Bar_Stacked_Horizontal } *END ENDSTYLE END -RUN designer.jpg1856998 169 KB In Tableau, I clicked the sort button and it did exactly what Im looking for (see below): tableau.jpg18471005 148 KB How do I replicate the total sort in Designer or InfoAssist Link to comment Share on other sites More sharing options...
Manoj Chaurasia Posted August 25, 2021 Share Posted August 25, 2021 HI Ryan Welcome to myibi Please post your code and use the tag pictured below before and after for it to work properly. image.png944135 9.38 KB Link to comment Share on other sites More sharing options...
Stephen Jenkins 2 Posted August 26, 2021 Share Posted August 26, 2021 Hi Ryan, Im happy to be corrected, but I dont believe Designer allows that as yet. We had a case for this recently. There are the following methods to do it with InfoAssist+ or via code: Via InfoAssist+: https://webfocusinfocenter.informationbuilders.com/wfappent/TL2s/TL_rel/source/Sort_Total_Value.htm Via Code: https://webfocusinfocenter.informationbuilders.com/wfappent/TL2s/TL_rel/source/charting_sort.htm I agree that this is a fundamental feature that should be as easy as it is in Tableau. In our applications, almost every instance where a stacked bar or column chart is created, wed want to do this eg: "show me the sales for top X geographies, stacked by product " Cheers, Steve Link to comment Share on other sites More sharing options...
Ryan Sullivan Posted August 26, 2021 Author Share Posted August 26, 2021 Thanks Stephen. Ill move it over to infoassist or edit the code to update for now. I agree though, stacked bar sort by total seems more like the rule whereas the discrete bar sort seems like an exception. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now