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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.
I have a requirement to create a Sankey chart in Webfocus, I was wondering if it is possible to create a Sankey in Webfocus. Has anyone done this before? Any advise or input on how to create Sankey would be helpful and greatly appreciated.
Regards Leela krishnaThis message has been edited. Last edited by: FP Mod Chuck,
Don't have experience with it, but I vaguely remembered reading something about WF extensions and Sankey. Dug up this post from 2017, maybe it will be helpful...good luck!
-HTMLFORM BEGIN
<!DOCTYPE html>
<html>
<body>
<head>
<script type="text/javascript"
src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1.1','packages':['sankey']}]}">
</script>
<div id="sankey_basic" style="width: 400px; height: 600px;"></div>
<script type="text/javascript">
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'From');
data.addColumn('string', 'To');
data.addColumn('number', 'Weight');
data.addRows([
-HTMLFORM END
SET NODATA = 'null'
SET HOLDLIST = PRINTONLY
-* Generate Javascript data
DEFINE FILE CAR
SEP/A2 = ', ';
END
TABLE FILE CAR
SUM
COMPUTE LINESTART/A13 = '['; AS ''
COMPUTE AXIS1/A80 = '''' || EDIT(FST.SEATS) || '''' ; AS ''
SEP AS ''
COMPUTE AXIS2/A80 = '''' || FST.COUNTRY || ''''; AS ''
SEP AS ''
SALES/D12c AS ''
COMPUTE LINEEND/A3 = '],'; AS ''
BY SEATS NOPRINT
BY COUNTRY NOPRINT
ON TABLE PCHOLD FORMAT ALPHA
END
-RUN
-HTMLFORM BEGIN
]);
// Set chart options
var options = {
width:400,
height:600,
};
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.Sankey(document.getElementById('sankey_basic'));
chart.draw(data, options);
}
</script>
</head>
</html>
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010