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     [CLOSED]Tooltip display on Pie

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Tooltip display on Pie
 Login/Join
 
Gold member
posted
Hi,

By default, tooltip displays value and percent in braces. I want to display only percent for few and only number for few.
How can I do that?

Thanks!

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


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 56 | Registered: January 13, 2015Report This Post
Platinum Member
posted Hide Post
Use custom tooltips

like below

GRAPH FILE EMPDATA
-* Created by Info Assist for Graph
SUM EMPDATA.EMPDATA.SALARY
BY EMPDATA.EMPDATA.DIV
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setUserToolTip("Buy: $[YV]");
*GRAPH_JS
-*pieProperties: {totalLabel: {visible: false},
series: [{series:'all', showDataValues:true},
{series: 'reset', tooltip: function(v, s, g) {return 'Buy: $' + v
+'
Series: ' + s }},
{series: 0, showDataValues:true},
{series: 1, showDataValues:true},
{series: 2, showDataValues:true},
{series: 3, showDataValues:true},
{series: 4, showDataValues:true}
],
dataLabels: {
visible: true,
position: 'middle',

}

*END
-*INCLUDE=ENIADefault_combine.sty,$
ENDSTYLE
END

setUserToolTip("Buy: $[YV]");

Thanks


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Master
posted Hide Post
To modify what Neelima posted because if I understand your request, you want some tool tips to show ONLY percentage, where some ONLY show values.. This would take putting in a tool tip method call for each series. The initial tooltip will be default, and can be overridden by the series: # ones.

GRAPH FILE EMPDATA
SUM EMPDATA.EMPDATA.SALARY
BY EMPDATA.EMPDATA.DIV
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET STYLE *
*GRAPH_JS
series: [
	{
		series:'reset', showDataValues:true,
			tooltip: function(v, s, g) {
				return 'Buy: $' + v +' Series: ' + s;
			}
	},
	{
		series: 1,
		tooltip: function(v, s, g) {
			var total = 0;

			//NOTE: == 8.0.xx code =============
			//get the total of all groups.
			//pv.sum works only for 8.0.xx and prior..
			//==================================
			//total = pv.sum(this.data[g], function(el){return el;});
			//========= EO 8.0.xx code =========

			//NOTE: == 8.1.xx code =============
			//get the total of all groups.
			//This below only works for 8.1.xx and up..
			//==================================
			var valueArr = this.data[0];
			for (var i=0 ;i<valueArr.length;i++) {
				total+=valueArr[i].value;
			}
			//========= EO 8.1.xx code =========

			var sum = v / total * 100 ;
			return 'Percentage ' + sum.toFixed(2) + '%';
		}
	},
	{
		series: 2,
		tooltip: function(v, s, g) {
			return 'Value: $' + v; 
		}
	}
],
dataLabels: {
	visible: true,
	position: 'middle',
}
*END
ENDSTYLE
END

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



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report 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     [CLOSED]Tooltip display on Pie

Copyright © 1996-2020 Information Builders