Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Negative and Positive values as datatext display

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Negative and Positive values as datatext display
 Login/Join
 
Member
posted
Hi,

I have a graph report in which i need to display both positive and negative values. Also i need to display the datatext values ABOVE the vertical bars.Now the issue is the negative datatext values are displaying inside the bars and positive values above the bars. I need all the data text values to display above the bars. Is there a property, so that i can specify data text position to negative values separately. Or some other property to detect the negative datatext values???

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 1 | Location: India | Registered: June 08, 2011Report This Post
Gold member
posted Hide Post
We can have an alternative work around for this as below, in which we are splitting the field as two one having positive and the other having negative value so that we can identify negative and positive values seperatly as a getseries().
Then using the following to identify the negative data:
setTextFormatPattern(getSeries(0),"-###,###");

-SET &V1=0;
-REPEAT LOOP1 2 TIMES
-SET &FLAG = IF &V1  EQ 0 THEN FLAG1 ELSE FLAG2;
-IF &V1 EQ 0 THEN GOTO LABEL1 ELSE GOTO LABEL2;
-LABEL1
FILEDEF FILE1 DISK FILE1
-GOTO SKPLAB2
-LABEL2
FILEDEF FILE1 DISK FILE1 (APPEND
-SKPLAB2
DEFINE FILE CAR
 DIFF/D20=IF COUNTRY EQ 'JAPAN' THEN ( DCOST - RCOST ) ELSE RCOST - DCOST ;
 NEGDIFF/D20=IF DIFF LT 0 THEN -1*DIFF ELSE 0;
 POSDIFF/D20=IF DIFF GT 0 THEN DIFF ELSE 0;
END
TABLE FILE CAR
SUM
COMPUTE FLAG/A6= '&FLAG.EVAL';
COMPUTE DIFF1/D20 = IF FLAG EQ 'FLAG1'      THEN NEGDIFF ELSE 0;
COMPUTE DIFF2/D20 = IF FLAG EQ 'FLAG1'      THEN POSDIFF ELSE 0;
COMPUTE FLAG2/D20  = IF FLAG EQ 'FLAG2' THEN HEIGHT  ELSE 0;
BY COUNTRY
ON TABLE HOLD AS FILE1
END
-SET &V1 = &V1+1;
-LOOP1

TABLE FILE FILE1
PRINT 
FLAG
DIFF1
DIFF2
FLAG2
BY COUNTRY
ON TABLE HOLD AS FNLHOLD
END
GRAPH FILE FNLHOLD
SUM
COMPUTE RATING1/I11 MISSING ON = IF DIFF1 EQ 0 THEN MISSING ELSE DIFF1;
COMPUTE RATING2/I11 MISSING ON = IF DIFF2 EQ 0 THEN MISSING ELSE DIFF2; 
COMPUTE FLAG2/I11  MISSING ON = IF FLAG2  EQ 0 THEN MISSING ELSE FLAG2; 
BY COUNTRY
BY FLAG                                
WHERE  TOTAL DIFF1 NE 0 OR DIFF2 NE 0 OR FLAG2 NE 0;
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET HZERO OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
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);
setFillColor(getSeries(0),new Color(255,0,0));
setDepthRadius(5);
setTextRotation(getDataText(),4);
setStackedDataValueSum(false);
setDataTextDisplay(true);
setDataTextPosition(1);
setFontSizeAbsolute(getDataText(5),true);
setFontSizeAbsolute(getDataText(4),true);
setFontSizeAbsolute(getDataText(3),true);
setFontSizeAbsolute(getDataText(2),true);
setFontSizeAbsolute(getDataText(1),true);
setFontSizeAbsolute(getDataText(0),true);
setFontSize(getDataText(5),14);
setFontSize(getDataText(4),14);
setFontSize(getDataText(3),14);
setFontSize(getDataText(2),14);
setFontSize(getDataText(1),14);
setFontSize(getDataText(0),14);
setLegendDisplay(false);
setDisplay(getSubtitle(),true);
setDisplay(getTitle(),true);
setO1MajorGridDisplay(false);
setTransparentBorderColor(getChartBackground(),true);
setPlace(true);
setFillColor(getFrame(),new Color(180,180,180));
setFillType(getFrame(),1);
setFillColor(getFrameSide(),new Color(255,255,255));
setFillColor(getSeries(1),new Color(255,111,90));
setFillColor(getSeries(2),new Color(255,255,128));
setFillColor(getSeries(3),new Color(146,221,98));
setFillColor(getSeries(4),new Color(27,183,5));
setFillColor(getSeries(5),new Color(118,126,138));
setScaleFromZero(false);
setPlaceResize(getO1Label(),1);
setPlaceSkip(getO1Label(),1);
setLabelStagger(getO1Label(),false);
setLabelMargin(getO1Label(),10);
setDisplay(getDataText(),true);
setFillColor(getSeries(0),new Color(255,153,0)); 
setDataTextDisplay (true);
setTextFormatPattern(getSeries(0),"-###,###");
ENDSTYLE
END


WebFOCUS 8.1.05
Windows
Excel, PDF, HTML
 
Posts: 72 | Location: Flowood , MS | Registered: May 11, 2011Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Negative and Positive values as datatext display

Copyright © 1996-2020 Information Builders