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     [CASE OPENED] Tag Cloud - One Plot Point

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE OPENED] Tag Cloud - One Plot Point
 Login/Join
 
Platinum Member
posted
I'm whipping up a tag cloud report.

When I only have one plot point - the graph doesn't render. I have checked out the Creating HTML5 Charts with WebFOUCS - but I don't see any mention of a single plot point not rendering.

Is there some set command that I'm missing to make a single plot render? Example below.

DEFINE FILE GGSALES
PROFIT/D12.2= DOLLARS-BUDDOLLARS ;
END
GRAPH FILE GGSALES
SUM PROFIT UNITS
BY PRODUCT
WHERE PRODUCT EQ 'Espresso'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH TAGCLOUD
ON GRAPH SET STYLE *
*GRAPH_JS
yaxis: {colorScale: {
colors: ['red', 'black', 'green', 'blue', 'purple']
}
}
*END
ENDSTYLE
END
-RUN


-IF &RECORDS EQ 0 GOTO ERROR ELSE GOTO DONE

-ERROR
-HTMLFORM BEGIN
<html>
<head>
</head>
<body>


<div style="width:100%">
<span style="font-size:1.5em">No Data!</span><p></p>
</div>



</body>
</html>
-HTMLFORM END
-DONE

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


webFOCUS 8207.15
WindowsServer 2019
 
Posts: 120 | Location: Minnesota | Registered: August 26, 2013Report This Post
Member
posted Hide Post
I get similar behaviour on 8105m, maybe try logging a call on TechSupport.

See new tagCloud just for interest:

DEFINE FILE GGSALES
PROFIT/D12.2= DOLLARS-BUDDOLLARS ;
END

GRAPH FILE GGSALES
SUM UNITS UNITS
BY PRODUCT
-*WHERE PRODUCT EQ 'Croissant';
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(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setUseSeriesShapes(true);
setScaleMustIncludeZero(getX1Axis(), false);
setScaleMustIncludeZero(getY1Axis(), false);
setScaleMustIncludeZero(getY2Axis(), false);
setMarkerSizeDefault(60);
setMarkerSizeDefault(50);
setPieFeelerTextDisplay(1);
*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
*GRAPH_JS
tagcloudProperties: {engine: 'new'},
*END
ENDSTYLE
END
-RUN


WF 8.1.05, MRE, BI Portal, App Studio, Apache Tomcat/8.0.21, MS Windows Server 2014 Express, MS Windows 10, Chrome
 
Posts: 11 | Registered: September 18, 2015Report This Post
Platinum Member
posted Hide Post
quote:
maybe try logging a call on TechSupport.

See new tagCloud just for interest:


I've opened a case.

Thanks for the tip on the new engine. It looks nice. However - when I toggled to the new engine - my drill downs stopped working....so I'm not sure if that's ready for prime time yet.


webFOCUS 8207.15
WindowsServer 2019
 
Posts: 120 | Location: Minnesota | Registered: August 26, 2013Report This Post
Platinum Member
posted Hide Post
I was told a tagcloud of one is odd - and the size rendered is calculated against the other values. Since there's only one - no soup for you.

I've put in a NFR for this.

My example is a TagCloud of Customers that order a product - so we can see our most and least profitable customers.

We have a few one off products that only one customer has ordered - so I'd argue that I'd still want to see that on a graph.

NFR has been submitted.


webFOCUS 8207.15
WindowsServer 2019
 
Posts: 120 | Location: Minnesota | Registered: August 26, 2013Report This Post
Guru
posted Hide Post
I just tried that "new" engine and it didn't display all of my items - looks like it skipped 2 or 3 of them, and the colors I defined did not come out either. Won't be using that one for a while.


Webfocus 8
Windows, Linux
 
Posts: 258 | Location: Palm Coast, FL | Registered: February 05, 2010Report This Post
Master
posted Hide Post
quote:
Originally posted by Mike in DeLand:
I just tried that "new" engine and it didn't display all of my items - looks like it skipped 2 or 3 of them, and the colors I defined did not come out either. Won't be using that one for a while.

The new engine doesn't render any tags in IE 9.


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Member
posted Hide Post
[QUOTE] and the colors I defined did not come out either.

I know this is an old post but I did get the color selection to work. see below.

 DEFINE FILE GGSALES
PROFIT/D12.2= DOLLARS-BUDDOLLARS ;
END

GRAPH FILE GGSALES
SUM UNITS UNITS
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(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setUseSeriesShapes(true);
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: ['PURPLE', 'SALMON', 'YELLOW', 'GREEN', 'AQUA']}},
*END
ENDSTYLE
END
-RUN

-*IA_GRAPH_FINISH 


WebFOCUS 8.1.04
Windows, All Outputs
 
Posts: 9 | Location: United States | Registered: March 18, 2015Report This Post
Master
posted Hide Post
Here is a workaround for the original post. This does not work for the "new" engine.

The chart fails when there is only one product, so the trick is to insert a second "empty" product into the chart code.

So these lines...

script += 'setDataSeries(';
script += '1703.00);';
script += 'setDataSeries(';
script += '308986.00);';

script += 'setGroupLabelArray(';
script += '"Espresso");';

...need to be changed to look like this:

script += 'setDataSeries(';
script += '1703.00,0.00);';
script += 'setDataSeries(';
script += '308986.00,0.00);';

script += 'setGroupLabelArray(';
script += '"Espresso"," ");';

To do that, the chart can be placed in an -HTMLFORM with a hold file named !IBI.FIL.CHART commented out.

<div id="fix_tag_cloud">
<!--
!IBI.FIL.CHART;
-->
</div>

That stops the chart from rendering right away, and gives some jQuery code a chance to modify the chart code. When it is done doing that, it removes the original chart code from the HTML and inserts the updated code and the chart renders.

Because of the way the chart code is generated, the jQuery code will fail to update anything if there is more than one product.

DEFINE FILE GGSALES
PROFIT/D12.2= DOLLARS-BUDDOLLARS ;
END
GRAPH FILE GGSALES
SUM PROFIT UNITS
BY PRODUCT
WHERE PRODUCT EQ 'Espresso';
ON GRAPH HOLD AS CHART FORMAT JSCHART
ON GRAPH SET LOOKGRAPH TAGCLOUD
ON GRAPH SET STYLE *
*GRAPH_JS
yaxis: {colorScale: {
colors: ['red', 'black', 'green', 'blue', 'purple']
}
}
*END
ENDSTYLE
END
-RUN

-IF &RECORDS EQ 0 GOTO ERROR ELSE GOTO DONE

-ERROR
-HTMLFORM BEGIN
<html>
<head>
</head>
<body>
<div style="width:100%">
<span style="font-size:1.5em">No Data!</span><p></p>
</div>
</body>
</html>
-HTMLFORM END
-DONE

-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="/ibi_html/javaassist/jquery/jquery_min.js"></script>
<script>
$(document).ready(function() {
	// Retrieve the tag cloud chart code from "fix_tag_cloud" div.
	var html = $("#fix_tag_cloud").clone().html();

	// Chart code is now one big string separated by newline chars.
	// Break it up into an array of individual lines.
	var code = html.split("\n");

	// Modify the lines causing the chart to not display when only one product is selected.
	// Adding a phantom second product fixes the problem.
	for(var i = 0; i < code.length; i++) {
		if (code[i].indexOf("setDataSeries(") > -1) code[i + 1] = code[i + 1].replace(");", ",0.00);");
		if (code[i].indexOf("setGroupLabelArray(") > -1) code[i + 1] = code[i + 1].replace(");", '," ");');

		// Blank out the HTML comment lines.
		if (code[i].indexOf("<!--") > -1) code[i] = "";
		if (code[i].indexOf("-->") > -1) code[i] = "";
	}

	// Reassemble the array items into one big string separated by newline chars.
	code = code.join("\n");

	// Clear out the "fix_tag_cloud" div contents and insert modified chart code.
	$("#fix_tag_cloud").empty().append($(code));
});
</script>
</head>
<body>
<div id="fix_tag_cloud">
<!--
!IBI.FIL.CHART;
-->
</div>
</body>
</html>
-HTMLFORM END


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report 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     [CASE OPENED] Tag Cloud - One Plot Point

Copyright © 1996-2020 Information Builders