Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]Another question with using the tooltipn Template Macro to Customize Tooltips
Go
New
Search
Notify
Tools
Reply
  
[Solved]Another question with using the tooltipn Template Macro to Customize Tooltips
 Login/Join
 
Platinum Member
posted
Hi All,

How do I access the BUCKET=tooltip fields when using a callback function?

Here is an example of a pie chart using the CAR file. The series 0 and 4 show the default tooltip (includes my three BUCKET=tooltip fields). Series 1 shows my three BUCKET=tooltip fields using only the {{tooltipn}} macro. Series 2 shows data from a callback function. Series 3 is an attempt to use data from a callback function as well as use data from my BUCKET=tooltip fields.

I can't seem to get a tooltip to work that uses both the data from a callback function and also data from my BUCKET=tooltip fields.

FYI - I am using WF version 8.201M

Here is my fex ...

GRAPH FILE CAR
SUM DEALER_COST AS 'Dealer Cost'
COMPUTE MY_SERIES/A10 = COUNTRY;
COMPUTE MY_VALUE/A10  = FPRINT(DEALER_COST, 'D7', 'A10');
COMPUTE MY_PCT/A8     = FPRINT(PCT.DEALER_COST, 'P6.2%', 'A8');
BY COUNTRY AS 'Country'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=DATA, COLUMN=N1, BUCKET=color, $
TYPE=DATA, COLUMN=N2, BUCKET=measure, $
TYPE=DATA, COLUMN=N3, BUCKET=tooltip, $
TYPE=DATA, COLUMN=N4, BUCKET=tooltip, $
TYPE=DATA, COLUMN=N5, BUCKET=tooltip, $
*GRAPH_JS_FINAL
"series": [
	{"series": 1, 
		"tooltip": 'ToolTip1: {{tooltip1}}<br>ToolTip2: {{tooltip2}}<br>ToolTip3: {{tooltip3}}'
	},
	{"series": 2,
		"tooltip": function(d,s,g){
			return 'value: ' + d + '<br>series: ' + s + '<br>group: ' + g; }
	},
	{"series": 3, 
    	"tooltip": function(d,s,g){
			return 'value: ' + d + '<br>series: ' + s + '<br>group: ' + g + '<br>ToolTip1: {{tooltip1}}'; }
	}
]
*END
ENDSTYLE
END


Please let me know if anyone has done this.

Thanks

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


WebFocus 8.201M, Windows, App Studio
 
Posts: 221 | Location: Lincoln Nebraska | Registered: August 12, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Hi jfr99

Since no one has offered any advice I recommend you open a case with techsupport.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1633 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
You should be able to access those values using something like the following code
*GRAPH_JS_FINAL
"series": [
	{"series": 0, 
		"tooltip": 'ToolTip1: {{tooltip1}}<br>ToolTip2: {{tooltip2}}<br>ToolTip3: {{tooltip3}}'
	},
	{"series": 1, 
		"tooltip": 'ToolTip1: {{tooltip1}}<br>ToolTip2: {{tooltip2}}<br>ToolTip3: {{tooltip3}}'
	},
	{"series": 2,
		"tooltip": function(d,s,g){
			return 'value: ' + d + '<br>series: ' + s + '<br>group: ' + g; }
	},
	{"series": 3, 
    	"tooltip": function(d,s,g){
		var mytooltip1 = this.data[0][s].tooltip1;
		var mytooltip2 = this.data[0][s].tooltip2;
		var mytooltip3 = this.data[0][s].tooltip3;
			return 'value: ' + d + '<br>series: ' + s + '<br>group: ' + g + '<br>ToolTip1:' + mytooltip1 + '<br>ToolTip2:' + mytooltip2 + '<br>ToolTip3:' + mytooltip3; }
	}
]
*END


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5610 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi Tony,

Thank You ... That's exactly what I wanted.

~Jim


WebFocus 8.201M, Windows, App Studio
 
Posts: 221 | Location: Lincoln Nebraska | Registered: August 12, 2008Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]Another question with using the tooltipn Template Macro to Customize Tooltips

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.