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 a PIE graph in which data is dispalyed with 2 digit decimal precision in %(Example - 4.59%).
Now i want to round the decimal precision to 3 digits (Example - 4.592%). How do i achieve that?
Sample code where its displayed with two decimal places:
GRAPH FILE CAR
SUM
DEALER_COST
BY CAR
WHERE CAR EQ 'BMW' OR 'MASERATI' OR 'JAGUAR' OR 'TOYOTA' OR 'AUDI' OR 'TRIUMPH'
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 200
ON GRAPH SET VAXIS 200
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIESINGL
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 0
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setPieDepth(10);
setPlace(true);
setPieLabelDisplay(3);
setPieFeelerTextFormat(4);
setDisplay(getLegendArea(),false);
setOtherPieLabelDisplay(3);
setFontName(getTitle(),"SansSerif");
setFillColor(getTitle(),new Color(32,0,32));
setFontStyle(getTitle(),2);
setFontSizeAbsolute(getTitle(),true);
setFontSizeInPoints(getTitle(),10);
setPlaceResize(getTitle(),0);
setTextWrap(getPieLabel(),true);
setGradientDirection(getSeries(0),9);
setFillType(getSeries(0),1);
setFillColor(getSeries(5),new Color(164,120,90));
setFillColor(getSeries(6),new Color(191,68,62));
setFillColor(getSeries(7),new Color(153,102,51));
setFillColor(getSeries(8),new Color(145,165,65));
setFillColor(getSeries(9),new Color(95,160,160));
setFillColor(getSeries(10),new Color(176,96,140));
setFontSizeAbsolute(getPieSliceLabel(),true);
setFontSizeInPoints(getPieSliceLabel(),8);
setPlaceResize(getPieSliceLabel(),0);
setFontSizeAbsolute(getPieLabel(),true);
setFontSizeInPoints(getPieLabel(),8);
setPlaceResize(getPieLabel(),0);
setFontStyle(getPieSliceLabel(),0);
setFontStyle(getPieLabel(),0);
setTransparentBorderColor(getChartBackground(),false);
setPieFeelerTextDisplay(1);
setRect(getPieFrame(),new Rectangle(-15520.0,-13672.0,36373.0,26084.0));
setTextString(getSubtitle(),"\n\n\n");
setTextString(getTitle()," \n");
setDisplay(getTitle(),true);
ENDSTYLE
ON GRAPH SET STYLE *
TYPE=DATA,COLOR=RGB(211 203 79),WHEN=N1 EQ 'BMW', $
TYPE=DATA,COLOR=RGB(164 120 190),WHEN=N1 EQ 'MASERATI', $
TYPE=DATA,COLOR=RGB(78 143 109),WHEN=N1 EQ 'JAGUAR', $
TYPE=DATA,COLOR=RGB(66 102 179),WHEN=N1 EQ 'TOYOTA', $
TYPE=DATA,COLOR=RGB(214 130 40),WHEN=N1 EQ 'AUDI', $
TYPE=DATA,COLOR=RGB(153 102 51),WHEN=N1 EQ 'TRIUMPH', $
ENDSTYLE
END
Result:
Have anyone come across like this? Thanks in advance...This message has been edited. Last edited by: SriAravind,
WebFocus Version 7.7.05 Windows, HTML/PDF/EXL2K/AHTML
The setting of the graph engine allows 0, 1 or 2 decimal numbers to be shown with the percent value. There just are no more options than those. If you need 3 decimals to be shown, the only alternative as I see it is to try and calculate it yourself and then include your own calculations in the graph.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
You can override the format, and specify your own.
Use setPieFeelerTextFormatPattern.
GRAPH FILE CAR
SUM
DEALER_COST
BY CAR
WHERE CAR EQ 'BMW' OR 'MASERATI' OR 'JAGUAR' OR 'TOYOTA' OR 'AUDI' OR 'TRIUMPH'
-*ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 200
ON GRAPH SET VAXIS 200
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIESINGL
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 0
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setPieDepth(10);
setPlace(true);
setPieLabelDisplay(3);
-*setPieFeelerTextFormat(4);
setPieFeelerTextFormat(-1);
setPieFeelerTextFormatPattern("#0.000%");
setDisplay(getLegendArea(),false);
setOtherPieLabelDisplay(3);
setFontName(getTitle(),"SansSerif");
setFillColor(getTitle(),new Color(32,0,32));
setFontStyle(getTitle(),2);
setFontSizeAbsolute(getTitle(),true);
setFontSizeInPoints(getTitle(),10);
setPlaceResize(getTitle(),0);
setTextWrap(getPieLabel(),true);
setGradientDirection(getSeries(0),9);
setFillType(getSeries(0),1);
setFillColor(getSeries(5),new Color(164,120,90));
setFillColor(getSeries(6),new Color(191,68,62));
setFillColor(getSeries(7),new Color(153,102,51));
setFillColor(getSeries(8),new Color(145,165,65));
setFillColor(getSeries(9),new Color(95,160,160));
setFillColor(getSeries(10),new Color(176,96,140));
setFontSizeAbsolute(getPieSliceLabel(),true);
setFontSizeInPoints(getPieSliceLabel(),8);
setPlaceResize(getPieSliceLabel(),0);
setFontSizeAbsolute(getPieLabel(),true);
setFontSizeInPoints(getPieLabel(),8);
setPlaceResize(getPieLabel(),0);
setFontStyle(getPieSliceLabel(),0);
setFontStyle(getPieLabel(),0);
setTransparentBorderColor(getChartBackground(),false);
setPieFeelerTextDisplay(1);
setRect(getPieFrame(),new Rectangle(-15520.0,-13672.0,36373.0,26084.0));
setTextString(getSubtitle(),"\n\n\n");
setTextString(getTitle()," \n");
setDisplay(getTitle(),true);
ENDSTYLE
ON GRAPH SET STYLE *
TYPE=DATA,COLOR=RGB(211 203 79),WHEN=N1 EQ 'BMW', $
TYPE=DATA,COLOR=RGB(164 120 190),WHEN=N1 EQ 'MASERATI', $
TYPE=DATA,COLOR=RGB(78 143 109),WHEN=N1 EQ 'JAGUAR', $
TYPE=DATA,COLOR=RGB(66 102 179),WHEN=N1 EQ 'TOYOTA', $
TYPE=DATA,COLOR=RGB(214 130 40),WHEN=N1 EQ 'AUDI', $
TYPE=DATA,COLOR=RGB(153 102 51),WHEN=N1 EQ 'TRIUMPH', $
ENDSTYLE
END
Thank you Waz... Is it possible to display data as "<1%" in the graph if the value is less than 1%[whatever it might be i.e. 0.005, 0.999)? How to achieve that?This message has been edited. Last edited by: SriAravind,
WebFocus Version 7.7.05 Windows, HTML/PDF/EXL2K/AHTML