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] Vertical Percent Bar Label

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Vertical Percent Bar Label
 Login/Join
 
Silver Member
posted
I've got a request to show a vertical percent bar graph but display the individual dollar amounts instead of they stacked % amount. Example Dealer A sold 10,000 dollars worth of cars and 90,000 dollars in trucks. The stacked bar would show 90% trucks, 10% cars and the labels for those bars would show 10,000 and 90,000. Searching the forum I found comments that it can't be done but they were from old threads. Just wanted to make sure a solution hasn't been found by someone.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8104, Windows, All Outputs
 
Posts: 43 | Registered: March 26, 2014Report This Post
<nick z>
posted
Yes, there is a way to do it in code in JSCHART output format only:

GRAPH FILE CAR
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBRSTKPC
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

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

*END

*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDataTextDisplay(true);
*END
*GRAPH_JS
dataLabels: {visible:true,
formatCallback: function(v, s,g) {
  if (typeof v === 'object' && v.hasOwnProperty('value')) {
    v = v.value;
  } else {
    v = this.data[s][g];
  }
  return this.formatNumber(v, '$#,#') ;
}},
series: [
{series: 'reset', showDataValues:true,
}
]

*END
ENDSTYLE
END

-RUN


Note: This is a workaround and will only work for this scenario where you have 2 or more Measures and only 1 BY field on a Percent BAR chart.
This may not work for other Chart types.
Thanks.
Nick.
 
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] Vertical Percent Bar Label

Copyright © 1996-2020 Information Builders