Focal Point
[CASE OPENED] TAGCLOUD FORMATTING TOOLTIP & BORDER

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

July 12, 2016, 08:47 AM
Maggie McBride
[CASE OPENED] TAGCLOUD FORMATTING TOOLTIP & BORDER
In using the new engine, I lost functionality with the tooltip and can not remove the border. I like the output of the the new engine, as it is not round like the default tagcloud. Is there a way to remove the border and have the tooltip work?

 GRAPH FILE ggsales
SUM 
DOLLARS
BY PRODUCT
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 GRWIDTH 1
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH TAGCLOUD
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(1);
setPieTilt(1);
setDepthRadius(0);
setCurveFitEquationDisplay(true);
setPlace(true);
setUseSeriesShapes(false);
setScaleMustIncludeZero(getX1Axis(), false);
setScaleMustIncludeZero(getY1Axis(), false);
setScaleMustIncludeZero(getY2Axis(), false);
setMarkerSizeDefault(60);
setMarkerSizeDefault(50);
setPieFeelerTextDisplay(0);
*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
*GRAPH_JS

tagcloudProperties: {engine: 'new'},
yaxis: {colorScale: {colors: ['GREY', 'SALMON', 'YELLOW', 'LIGHTGREEN', 'AQUA']}},
-*tagcloudProperties: { maxNumberOfTags: 100 }
*END

ENDSTYLE
END
-RUN 

This message has been edited. Last edited by: Maggie McBride,


WebFOCUS 8.1.04
Windows, All Outputs
July 12, 2016, 09:52 AM
Squatch
I tried two different ways to get the tooltip to work, but was unsuccessful.

I was also unable to remove the border the "proper" way in the GRAPH_SCRIPT section, but here is a workaround using jQuery that will remove the border after the chart loads or resizes:

GRAPH FILE ggsales
SUM 
DOLLARS
BY PRODUCT
ON GRAPH HOLD AS SAVE_CHART 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 GRWIDTH 1
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH TAGCLOUD
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(1);
setPieTilt(1);
setDepthRadius(0);
setCurveFitEquationDisplay(true);
setPlace(true);
setUseSeriesShapes(false);
setScaleMustIncludeZero(getX1Axis(), false);
setScaleMustIncludeZero(getY1Axis(), false);
setScaleMustIncludeZero(getY2Axis(), false);
setMarkerSizeDefault(60);
setMarkerSizeDefault(50);
setPieFeelerTextDisplay(0);
-*setToolTipOn();
*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
*GRAPH_JS

tagcloudProperties: {engine: 'new'},
yaxis: {colorScale: {colors: ['GREY', 'SALMON', 'YELLOW', 'LIGHTGREEN', 'AQUA']}},
-*htmlToolTip: {
-*	enabled: false,
-*	mouseMargin: 10,  
-*	style: undefined,
-*	autoTitleFont: 'bold 12pt Sans-Serif',
-*	autoContentFont: '10pt Sans-Serif',
-*	snap: false,
-*	sticky: false
-*	},
-*tagcloudProperties: { maxNumberOfTags: 100 }
*END

ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
<head>
  <script type="text/javascript" src="/ibi_apps/jquery/js/jquery.min.js"></script>
</head>
<body>
!IBI.FIL.SAVE_CHART;
</body>
<script>
  // Remove tagcloud chart border after window appears
  $(window).load(function() {
	remove_border();
  });

  // Remove it again if window is resized
  $(window).resize(function() {
	remove_border();
  });

  // Find CSS class named "background" and set SVG stroke width property to zero
  function remove_border() {
	$(".background").attr("stroke-width","0");
  }
</script>
</html>
-HTMLFORM END



App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
July 12, 2016, 09:58 AM
Maggie McBride
Thanks so much Squatch..That helps!


WebFOCUS 8.1.04
Windows, All Outputs