Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Display Percent Sign in Chart within InfoAssist
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Display Percent Sign in Chart within InfoAssist
 Login/Join
 
Expert
posted
What's wrong with this? The numeric value of the percentages is correct. But, what I'm missing is the percent sign on the line chart. The percent sign is displayed properly when you hover over the value.

BTW: This needs to be accomplished within InfoAssist 8204.

-*COMPONENT=Define_car
DEFINE FILE baseapp/car
DF_Profit_Amount/D12M=CAR.BODY.RETAIL_COST - CAR.BODY.DEALER_COST ;
DF_Profit_Percent/D6.2%=((CAR.BODY.RETAIL_COST - CAR.BODY.DEALER_COST) / CAR.BODY.DEALER_COST ) * 100;
END
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_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';

-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE baseapp/car
-* Created by Info Assist for Graph
SUM CAR.BODY.RETAIL_COST
CAR.BODY.DEALER_COST
DF_Profit_Amount
DF_Profit_Percent/D6.1%
BY CAR.CARREC.MODEL
WHERE CAR.CARREC.MODEL LE '2002 2 DOOR AUTO';
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
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 *
*GRAPH_SCRIPT

setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setPlace(true); 
setCurveFitEquationDisplay(false); 

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis(1), $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis(1), $
TYPE=DATA, COLUMN=N4, BUCKET=y-axis(1), $
TYPE=DATA, COLUMN=N5, BUCKET=y-axis(2), $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
setSeriesType(3,2);
setDataTextPosition(1);
setDisplay(getDataText(3), true);
setTextFormatPreset(getY2Label(),2);
setDisplay(getLegendArea(),false);
setCustomDataText(getDataText(3), true);
setTextFormatPreset(getDataText(3), 0);
setTransparentBorderColor(getSeries(*), true);
setSeriesType(2,1);
*GRAPH_JS_FINAL
"pieProperties": {
"holeSize": "0%"
},
"riserBevel": "cylinder",
"agnosticSettings": {
"dual": true,
"chartTypeFullName": "Bar_Clustered_Dual_Axis"
}

*END
ENDSTYLE
END

-RUN
It's gotta be something simple, right?

This message has been edited. Last edited by: FP Mod Chuck,


   See you at Summit! In FOCUS Since 1983 ~ from PC FOCUS to WebFOCUS.
   Currrently using 8204 Gen 48 in Test and Production.
   KGPCo at CenturyLink. October 2017 to Present...
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
In InfoAssist, change your percent by removing the * 100. Then right click the label on the line chart and choose More Labels Options...

For the Format Labels pick Percent with two decimals.


WebFOCUS 8204, Unix, Windows
 
Posts: 1610 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Expert
posted Hide Post
Babak,

I got that. But, the display is '0' on hover...

-*COMPONENT=Define_car
DEFINE FILE baseapp/car
DF_Profit_Amount/D12M=CAR.BODY.RETAIL_COST - CAR.BODY.DEALER_COST;
DF_Profit_Percent/D6=(CAR.BODY.RETAIL_COST - CAR.BODY.DEALER_COST) / CAR.BODY.DEALER_COST;
END
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_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';

-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE baseapp/car
-* Created by Info Assist for Graph
SUM CAR.BODY.RETAIL_COST
CAR.BODY.DEALER_COST
DF_Profit_Amount
DF_Profit_Percent
BY CAR.CARREC.MODEL
WHERE CAR.CARREC.MODEL LE '2002 2 DOOR AUTO';
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 *
*GRAPH_SCRIPT

setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setCurveFitEquationDisplay(false); 
setPlace(true); 

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis(1), $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis(1), $
TYPE=DATA, COLUMN=N4, BUCKET=y-axis(1), $
TYPE=DATA, COLUMN=N5, BUCKET=y-axis(2), $
*GRAPH_SCRIPT

setReportParsingErrors(false);
setSelectionEnableMove(false);
setTransparentBorderColor(getSeries(*), true);
setDataTextPosition(1);
setCustomDataText(getDataText(3), true);
setTextFormatPreset(getDataText(3), 4);
setSeriesType(3,2);
setTextFormatPreset(getY2Label(),4);
setFontName(getDataText(3), "ARIAL BLACK");
setFontSizeAbsolute(getDataText(3), true);
setFontSizeInPoints(getDataText(3), 12);
setPlaceResize(getDataText(3), 0);
setDisplay(getDataText(3), true);
setPieFeelerTextDisplay(1);
*GRAPH_JS_FINAL
"pieProperties": {
"holeSize": "0%"
},
"riserBevel": "cylinder",
"agnosticSettings": {
"dual": true,
"chartTypeFullName": "Bar_Clustered_Dual_Axis"
}

*END
ENDSTYLE
END

-RUN

 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
As you probably already have noticed, it display 0 because your define do not include any decimal
DF_Profit_Percent/D6

Having defined as
DF_Profit_Percent/D6.2

will show the value but as a decimal one and not as a percentage such as in the DataText.

Since the percentage value is calculate internally based on selected display format,
I think that to have it displayed in the same way within the hover tooltip (20.55%) you need to use the customized tooltip which I don't think it's possible using IA


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2075 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
The D6.2 does show the two decimal places. But as a decimal, not as the percent as seen in the label of the line chart as required. Frowner

... "which I don't think it's possible using IA" ... Frowner

 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Doug,

In the past I put the percent sign in the Label. So in this case DF_Profit_Percent %. This will over do it but it is an option. This makes it a little bit easier to explain to the different Business partners that are able to create objects to be used in their groups.


dksib
DC Tech Services Inc
WF 8.2.1M
 
Posts: 116 | Location: US | Registered: February 09, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
So, it looks like it cannot be done from within IA, Right?
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
Originally posted by David Sibert:

In the past I put the percent sign in the Label. So in this case DF_Profit_Percent %.

Could be a great option, but the issue is that it will display
DF_Profit_Percent % 0.20

When in reality it is (such as in the DataText)
DF_Profit_Percent % 20.55


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2075 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
NFR or Hopes that it'll be in the 8205 Designer.

OR I'll tag this as a NFR as that may push it to ensure it gets


   See you at Summit! In FOCUS Since 1983 ~ from PC FOCUS to WebFOCUS.
   Currrently using 8204 Gen 48 in Test and Production.
   KGPCo at CenturyLink. October 2017 to Present...
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Display Percent Sign in Chart within InfoAssist

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.