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     [SOLVED] last bar to be displayed full

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] last bar to be displayed full
 Login/Join
 
Member
posted
Hi,

I have code like below
DEFINE FILE CAR
LOSS/I8 = -4500;
END

GRAPH FILE CAR
SUM
DEALER_COST
RETAIL_COST
LOSS
SALES
ON GRAPH SET LOOKGRAPH VWATERFL
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET BARNUMB ON
ON GRAPH SET VAXIS 500
ON GRAPH SET HAXIS 600
ON GRAPH SET VZERO ON
ON GRAPH SET STYLE *

*GRAPH_JS
legend: {visible:false},
waterfallProperties: {
appendTotalRiser: false,
positiveRiserColor: 'blue',
negativeRiserColor: 'yellow',
connectorLine: {
width: 0,
}

}
*END
ENDSTYLE
END

where the last bar "SALES" need to be displayed from the axis - 0 and also I need to change the title from SALES to any other title how to achieve this using waterfall chart

This message has been edited. Last edited by: <Kathryn Henning>,
 
Posts: 19 | Registered: June 26, 2015Report This Post
<nick z>
posted
Hi Satya,
Yes,
You can add:
  subtotalRisers: [3], 

to your waterfall property.
If you want to change the color of this subtotal riser to match your positive riser colors you would also need to add:
 zeroRiserColor: 'blue', 


And you can change SALES to display anything you like by using AS 'name' for example:
SUM SALES AS 'TOTAL_SALES'

Here is a complete example:

  
DEFINE FILE CAR
LOSS/I8 = -4500;
END

GRAPH FILE CAR
SUM
	DEALER_COST
	RETAIL_COST
	LOSS
	SALES AS 'TOTAL_SALES'
ON GRAPH SET LOOKGRAPH VWATERFL
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET BARNUMB ON
ON GRAPH SET VAXIS 500
ON GRAPH SET HAXIS 600
ON GRAPH SET VZERO ON
ON GRAPH SET STYLE *

*GRAPH_JS
legend: {visible:false},
waterfallProperties: {
appendTotalRiser: false,
positiveRiserColor: 'blue',
negativeRiserColor: 'yellow',
subtotalRisers: [3],  
zeroRiserColor: 'blue',
connectorLine: {
width: 0,
}

}
*END
ENDSTYLE
END





However,
I would recommend a slightly different approach.
Instead of using subtotalRisers, I would instead turn appendTotalRiser to true and remove SALES from your request.
You can then change the name of the Total to anything you like with:
totalLabel: 'Total_Sales',

Here is a complete code:

 
DEFINE FILE CAR
LOSS/I8 = -4500;
END

GRAPH FILE CAR
SUM
	DEALER_COST
	RETAIL_COST
	LOSS
ON GRAPH SET LOOKGRAPH VWATERFL
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET BARNUMB ON
ON GRAPH SET VAXIS 500
ON GRAPH SET HAXIS 600
ON GRAPH SET VZERO ON
ON GRAPH SET STYLE *

*GRAPH_JS
legend: {visible:false},
waterfallProperties: {
appendTotalRiser: true,
positiveRiserColor: 'blue',
negativeRiserColor: 'yellow',
zeroRiserColor: 'blue',
totalLabel: 'Total_Sales',
connectorLine: {
width: 0,
}

}
*END
ENDSTYLE
END



Thanks.
Nick.
 
Report This Post
Member
posted Hide Post
thanks for the reply, for PNG out put how to achieve
below functionalities

positiveRiserColor: 'blue',
negativeRiserColor: 'yellow',
zeroRiserColor: 'blue',

Please help

thanks
 
Posts: 19 | Registered: June 26, 2015Report This Post
Member
posted Hide Post
There is no direct function for this, hence closed
 
Posts: 19 | Registered: June 26, 2015Report This Post
<nick z>
posted
You can achieve similar outcome in PNG. The only difference is that your positive risers will be green and negative will be red.
There is no way to change that in PNG format.
Here is a complete code example:

  
DEFINE FILE CAR
LOSS/I8 = -4500;
END

GRAPH FILE CAR
SUM
	DEALER_COST
	RETAIL_COST
	LOSS
COMPUTE	TOTAL_SALES/D12= (DEALER_COST+RETAIL_COST + LOSS); 
ON GRAPH SET LOOKGRAPH VWATERFL
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET BARNUMB ON
ON GRAPH SET VAXIS 500
ON GRAPH SET HAXIS 600
ON GRAPH SET VZERO ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setDepthRadius(0);
setDepthAngle(0);
setPlace(true); 
setReportParsingErrors(false);
setSelectionEnableMove(false);
setWaterfallLastGroupTotal(true);
setWaterfallStackColorMode(true);
setStackedDataValueSum(false);
setDisplay(getWaterfallLine(), false);
setDataTextDisplay(true);
setDisplay(getLegendArea(),false);
ENDSTYLE
END
 
Report 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     [SOLVED] last bar to be displayed full

Copyright © 1996-2020 Information Builders