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 have created the following code for the pie chart. In this code, I'm trying to get the name of the country at the top of each pei chart instead of the bottom of the charts. Can anybody please guide me?
GRAPH FILE CAR -* Created by Advanced Graph Assistant SUM COMPUTE PROFIT/P13.2M = RETAIL_COST - DEALER_COST; AS '' BY COUNTRY BY SALES
ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET VZERO OFF ON GRAPH SET HTMLENCODE ON ON GRAPH SET GRAPHDEFAULT OFF ON GRAPH SET GRWIDTH 1 ON GRAPH SET UNITS &WF_STYLE_UNITS ON GRAPH SET HAXIS 1000 ON GRAPH SET VAXIS 330 ON GRAPH SET GRMERGE ADVANCED ON GRAPH SET GRMULTIGRAPH 0 ON GRAPH SET GRLEGEND 1 ON GRAPH SET GRXAXIS 1 ON GRAPH SET LOOKGRAPH PIEMULTI ON GRAPH SET AUTOFIT OFF ON GRAPH SET STYLE *
Since there does not appear to be a legitimate way to do this, I guess it's time to "cheat."
The following code will HOLD the chart, then make the country label adjustments in an HTMLFORM. The subtitle is now just a space character to hold the space the actual subtitle used to take up (Which is now used for country label placement). The report title is now just a HEADING in the graph:
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
GRAPH FILE CAR
-* Created by Advanced Graph Assistant
SUM COMPUTE PROFIT/P13.2M = RETAIL_COST - DEALER_COST; AS ''
BY COUNTRY
BY SALES
HEADING
"Report Title"
ON GRAPH HOLD AS MP_GRAPH FORMAT JSCHART
-*ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS 1000
ON GRAPH SET VAXIS 330
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH PIEMULTI
ON GRAPH SET AUTOFIT OFF
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/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=HEADING, JUSTIFY=CENTER, FONT='ARIAL', SIZE=11, COLOR=RGB(66 70 73),
STYLE=BOLD, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(true);
setFillColor(getSeries(0),new Color (248,151,29));
setFillColor(getSeries(1),new Color (0,119,200));
setFillColor(getSeries(2),new Color (154,155,156));
setLegendPosition(1);
setDisplay(getPieLabel(),true);
setPieLabelDisplay(5);
setTextString(getSubtitle()," ");
setDisplay(getSubtitle(),true);
END
-RUN
-HTMLFORM BEGIN
!IBI.FIL.MP_GRAPH;
<script type="text/javascript">
// Country labels for the multi-charts all have class "pieLabel"
var x = document.getElementsByClassName('pieLabel');
// Tweak SVG "transform" property to shift country labels above the charts
// Change from "translate(166.33333333333331, 133)"
for (var i = 0; i <= x.length; i++) x[i].setAttribute('transform', 'translate(166.33333333333331, 0)');
</script>
-HTMLFORM END
This message has been edited. Last edited by: Squatch,
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015