As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I'm having some difficulty sorting a pie chart by anything other than the BY field. Specifically, I'd like to sort by the percentage each piece occupies (so the largest piece, then second largest... down to the smallest).
For instance:
GRAPH FILE CAR
HEADING CENTER
"Model Count by Make"
SUM CNT.MODEL
BY CAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieSorting(2);
setPieFeelerTextDisplay(1);
*END
ENDSTYLE
END
I thought setPieSorting would address my need, but it doesn't seem to do anything. Is there a way to sort pie graphs by either percent or value?
Thanks! JayThis message has been edited. Last edited by: FP Mod Chuck,
GRAPH FILE ibisamp/car
SUM CNT.MODEL
BY TOTAL HIGHEST CNT.MODEL NOPRINT
BY CAR
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setPieFeelerTextDisplay(1);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=DATA, COLUMN=N1, BUCKET=color, $
TYPE=DATA, COLUMN=N2, BUCKET=color, $
TYPE=DATA, COLUMN=N3, BUCKET=measure, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*GRAPH_JS_FINAL
"pieProperties": {
"holeSize": "0%"
},
"agnosticSettings": {
"chartTypeFullName": "Pie_Pie"
}
*END
ENDSTYLE
END
-RUN
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
Thank you for the response! I can't get your code to run as is, because Warm.sty isn't saved at that address as far as I can tell, and I can't find it. When I swap that style out with one I know works, I get a pie chart with 7 identically sized slices with a value of 1.
Any thoughts on what my app may be doing wrong in this?
What version are you running? The code runs in my environment even when you comment out the style line. However, if you have InfoAssist, you should be able to create the same code in your version. Create a pie chart with CNT.MODEL as the measure and Color by CAR. Then right click CNT.MODEL in the query and click Sort, Descending. That ought to create a BY TOTAL CNT.MODEL NOPRINT in your code. See if that works.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
Originally posted by Jay Ervin: Thank you for the response! I can't get your code to run as is, because Warm.sty isn't saved at that address as far as I can tell, and I can't find it. When I swap that style out with one I know works, I get a pie chart with 7 identically sized slices with a value of 1.
Any thoughts on what my app may be doing wrong in this?
Some more detail... I'm pretty sure the 7 pieces are the 7 car makes with only 1 model, so its excluding the 3 makes with 2+ models. The lines