Focal Point
[CLOSED]Stack Bar Total on top

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

October 26, 2016, 11:37 AM
David Sibert
[CLOSED]Stack Bar Total on top
I am trying to have the total of the stack bar displayed on top. It works when I have a value for all of the elements. When a field is either missing or has an 0 (zero) the total is displayed on the bottom of the bar like it is a negative. I am setting the datastaacktotalontop to true.

This message has been edited. Last edited by: <Emily McAllister>,


dksib
DC Tech Services Inc
WF 8.2.1M
October 26, 2016, 01:13 PM
BabakNYC
I'm seeing this behavior in 8105 as well. I think in the case of Stacked bars, putting the label above the bar might get confusing for the bottom segments. So, the code for Above and and Below Top Edge generates the same label inside the segment.

The good news is I tested the same thing in 8.2 and it suppresses the label when the value is missing or 0.


WebFOCUS 8206, Unix, Windows
October 27, 2016, 03:02 PM
Doug
Hey David, can you post your code (using the CAR file)?
October 27, 2016, 08:14 PM
David Briars
I don't think I am seeing the 'zero stack total label' looking like it is negative.

-* File stackedbarwithtotals.fex
TABLE FILE GGSALES
SUM
COMPUTE NEWDOLLARS/D12.2 = IF ST EQ 'IL' OR 'MA' THEN 0 ELSE DOLLARS;
COMPUTE NEWBUDGET/D12.2 = IF ST EQ 'IL' THEN 0 ELSE BUDDOLLARS;
BY ST
ON TABLE HOLD
END
-*
GRAPH FILE HOLD
SUM NEWDOLLARS
    NEWBUDGET
BY ST
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET AUTOFIT ON
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
 *GRAPH_JS
  blaProperties: {
   seriesLayout: 'stacked',
   stackTotalLabel:
   {visible: true,
    font: 'bold 10pt Sans-Serif, bold',
    color: 'red'}
   },
  series: [{series: 'all', showDataValues: true} ],
  dataLabels: {visible: true, useNegativeColor: true,
               font: 'bold 10pt Sans-Serif', color: 'black'}
 *END
ENDSTYLE
END 





Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
February 01, 2017, 08:36 AM
WFLurker
Question on stacked graph and stacktotal. Is it possible to change the formula from Adding to subtracting for the display?
newdollars - newbudget?


WF 8105M
- Portal, Dashboard
- Rcaster, Data Migrator
- Windows 2012 Client Server
- Dev/App Studio 8105
- Data: SQL, Oracle, Neteeza,MVS