Focal Point
[SOLVED/WORKAROUND] InfoAssist: Show Stacked Total Label Format?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5767048096

October 12, 2018, 11:10 AM
Doug
[SOLVED/WORKAROUND] InfoAssist: Show Stacked Total Label Format?
The 'Show Stacked Total' doesn't display in the same format as that of the 'Series'.

Is this an issue within IA? I'm sure there's a work-around, that someone may provide, but, shouldn't that carry thru to the stacked total?

Now in 8204 Smiler

Here's the code:
-* File: IBFS:/Dev/WFC/Repository/KGPCo_IT/Doug/Total_Label_Format_Issue.fex Created by WebFOCUS AppStudio
SET PAGE-NUM=NOLEAD
-*IA_GRAPH_BEGIN
-*Do not delete or modify the comments below
-* deleted
-*Do not delete or modify the comments above
ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
-DEFAULTH &WF_HTMLENCODE=ON;
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 CAR
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.COMP.CAR
HEADING
"Total_Label_Format_Issue.fex"
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, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataText(),true);
setDisplay(getDataTextStackedTotalOnTop(),true);
setZeroValueDataTextStackedTotalOnTopDisplay(true);
setDataTextDisplay(true);
setTextFormatPreset(getDataText(),8);
setDisplay(getLegendArea(),false);
setDisplay(getO1Title(),false);
setTransparentBorderColor(getSeries(*), true);
*GRAPH_JS_FINAL
"xaxis": {
    "title": {
        "visible": false
    }
},
"pieProperties": {
    "holeSize": "0%"
},
"introAnimation": {
    "duration": 750.0,
    "enabled": true
},
"blaProperties": {
    "seriesLayout": "stacked"
},
"riserBevel": "bevel",
"agnosticSettings": {
    "chartTypeFullName": "Bar_Stacked"
}
*END
ENDSTYLE
END
-RUN

-*IA_GRAPH_FINISH


Thanks, Doug

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
October 12, 2018, 11:38 AM
MartinY
Play with this to have it the format you want
"blaProperties": {
    "seriesLayout": "stacked",
    "stackTotalLabel":{visible: true,
                   font: '10pt Serif, bold',
                   color: 'red',
                   numberFormat: {mode: 'currency', grouping: 'M'}}
},


From page 487 of this document : Creating HTML Charts


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
October 12, 2018, 11:43 AM
Doug
Thanks Martin, I didn't see that in the FM (FOCUS Manual)...

IA has the option to add stacked totals, but it doesn't apply the formatting from the other series.

So, there's nothing to make this happen, with formatting, directly in IA?
October 12, 2018, 11:52 AM
MartinY
I would like to answer you yes, but it still seems that a lot of developer's options are not available using "User's" tool.

It may have an option somewhere but since my organisation is not using IA I cannot confirm.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
October 12, 2018, 12:04 PM
Doug
Thanks again Martin,

I've been using I've been using the developer's tools since... forever, at least since they came out. Now, I'm mentoring others on 'doing everything they need" in IA - Converting Excel spreadsheets to 'BI" / WebFOCUS Portals. I know Pareto Principle applies heavily to IA and, imho, IA is doing a fantastic job with that regard.

Unfortunately, the addition of code to 'BlaProperties' broke other functions which produced a blank screen, ended with the good old "NUMBER OF RECORDS IN GRAPH= 20551 PLOT POINTS= 13" message instead of the chart. AKA: That didn't work for me in this chart.

So, I did a bit of snooping thru the code and found that I can add setTextFormatPreset(getDataTextStackedTotalOnTop(),10);, a derivative of setTextFormatPreset(getDataText(),10);, which formats the series, to make it work.

So, all is good on the home front. Thanks for your input as it put me on the right track to the solution. Smiler