Focal Point
Hiding Tooltip

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4861022142

August 10, 2007, 08:57 AM
lakshmi
Hiding Tooltip
Hi,

I've a requirement where I need to hide the tooltip value for X axis. To be clear I dont want the field name specified in ACROSS to be displayed in the Graph. I want to suppress the value getting displayed there. Is that possible?

Thanks


Lakshmi
WF 713 WinXP/IIS/Apache Self Service
August 10, 2007, 10:29 AM
dhagen
lakshmi,

Are you looking to remove the tooltip completely, or do you just want the value of the measure to be displayed without the field names?


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
August 10, 2007, 10:55 AM
dhagen
To remove tooltip completely:

Fex
  
-* File graphtest.fex
SET JSURL=/approot/baseapp/remove_tool_tip.js
-* SET JSURL=/approot/baseapp/remove_tool_tip_xvalue.js
GRAPH FILE CAR
SUM SALES AS ''
ACROSS MODEL AS ''
ON GRAPH SET VAUTO OFF
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET AUTOTICK OFF
ON GRAPH SET VAUTO OFF
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
ENDSTYLE
END


JavaScript file /approot/baseapp/remove_tool_tip.js
function changeAllArea() {
   var areaList = document.getElementsByTagName("area");
   for (var i = 0; i < areaList.length; i++) {
       areaList[i].removeAttribute("alt");
       areaList[i].removeAttribute("title");
   }
}

if (window.addEventListener) {
	window.addEventListener('load', 'changeAllArea', false);
} else if (window.attachEvent) {
	window.attachEvent('onload', changeAllArea);
} else {
	alert("not supported");
}


To only show the Y value in the tooltip:
JavaScript file /approot/baseapp/remove_tool_tip_xvalue.js
function changeAllArea() {
   var areaList = document.getElementsByTagName("area");
   for (var i = 0; i < areaList.length; i++) {
       var yValue = areaList[i].alt.split(" ");
       areaList[i].alt = yValue[yValue.length-1];
       areaList[i].title = yValue[yValue.length-1];
   }
}

if (window.addEventListener) {
	window.addEventListener('load', 'changeAllArea', false);
} else if (window.attachEvent) {
	window.attachEvent('onload', changeAllArea);
} else {
	alert("not supported");
}



"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
August 14, 2007, 07:58 AM
lakshmi
Thank you Dhagen,

I made some changes in the JS file to cater our requirement.

It worked!!! Great


Lakshmi
WF 713 WinXP/IIS/Apache Self Service