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] Display two measures on hover tool tip
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Display two measures on hover tool tip
 Login/Join
 
Gold member
posted
Hi,

I have two measures plotted on a bar graph, I would like to display these two measures on the tool tip whenever someone hovers on any of these bars be it measure 1 bar or measure 2 bar. I have tried doing this, but did not get the needed result. Please find my code below and post your thoughts and inputs if you have any. Thank you in advance.

GRAPH FILE CAR
SUM 
RETAIL_COST
DEALER_COST
COMPUTE RETAIL_COST1/D7=RETAIL_COST;
COMPUTE DEALER_COST1/D7=DEALER_COST;
BY COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 700
ON GRAPH SET VAXIS 400
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET=color, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $
TYPE=DATA, COLUMN=RETAIL_COST1, BUCKET=tooltip, $
TYPE=DATA, COLUMN=DEALER_COST1, BUCKET=tooltip, $
*GRAPH_JS_FINAL
series: [ {"series": 'reset', "tooltip":"Retail:"+ '{{tooltip1}}'}]
-*<br>"Dealer:"+{{tooltip2}}'} ]
-*,
-*htmlToolTip: {enable: true, snap: false }
*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDataTextPosition(4);
setDataTextDisplay(true);
setDisplay(getLegendArea(),true);
*END
ENDSTYLE
END
-RUN
  

This message has been edited. Last edited by: FP Mod Chuck,


Webfocus 8105/8202
Windows
All Outputs
 
Posts: 71 | Registered: June 26, 2018Reply With QuoteReport This Post
Guru
posted Hide Post
GRAPH FILE CAR
SUM 
RETAIL_COST
DEALER_COST
COMPUTE RETAIL_COST1/D7=RETAIL_COST;
COMPUTE DEALER_COST1/D7=DEALER_COST;
BY COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 700
ON GRAPH SET VAXIS 400
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
INCLUDE=ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET=color, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $
TYPE=DATA, COLUMN=RETAIL_COST1, BUCKET=tooltip, $
TYPE=DATA, COLUMN=DEALER_COST1, BUCKET=tooltip, $
*GRAPH_JS_FINAL
series: [ {"series": 'reset', "tooltip":"Retail:"+ '{{tooltip1}}'+'<br>Dealer:'+'{{tooltip2}}'} ]
-*,
-*htmlToolTip: {enable: true, snap: false }
*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDataTextPosition(4);
setDataTextDisplay(true);
setDisplay(getLegendArea(),true);
*END
ENDSTYLE
END
-RUN
  


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 411 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Gold member
posted Hide Post
Hi Frans,

Thanks for taking time, is there a way to format the text in the tool tip? something like font-weight, font-size and font-family etc.

Regards
BI DEV


Webfocus 8105/8202
Windows
All Outputs
 
Posts: 71 | Registered: June 26, 2018Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Display two measures on hover tool tip

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