Hi!
When i try to use Google Charts to make a Sankey Diagram in SAS eg i cant view it in the "SAS EG browser". If I right click and choose "open with windows default" then it works fine in Firefox.
Am I doing something wrong or are JS visualisations such as google charts not supported by the SAS eg ouput viewer browser?
My code:
filename _webout "out2.html";
data _null_;
file _webout;
put ' <html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load("current", {"packages":["sankey"]});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn("string", "From");
data.addColumn("string", "To");
data.addColumn("number", "Weight");
data.addRows([
[ "A", "X", 5 ],
[ "A", "Y", 7 ],
[ "A", "Z", 0 ],
[ "B", "X", 2 ],
[ "B", "Y", 9 ],
[ "B", "Z", 4 ]
]);
var options = {
width: 600,
};
var chart = new google.visualization.Sankey(document.getElementById("sankey_basic"));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="sankey_basic" style="width: 900px; height: 300px;"></div>
</body>
</html>'
;;;;;;;
run;
The error I get in SAS EG when viewing the ouput there:
Best regards
The embedded browser in EG is a hosted version of the Microsoft IE component that's built into Windows. You can change your EG preferences to always open HTML output in an external window (Chrome or FF). The embedded browser won't be able to run your scripts.
The embedded browser in EG is a hosted version of the Microsoft IE component that's built into Windows. You can change your EG preferences to always open HTML output in an external window (Chrome or FF). The embedded browser won't be able to run your scripts.
@snoopy369 - it's wrapped up in the WebBrowser control that's part of the .NET Framework. Under the surface, it is using some DLLs that are shared with IE. It would be simple to build a small app that could be used for testing, but there isn't a way (that I know of) to drive EG to do this for you.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: