Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems to loop #5

Open
nomeata opened this issue Feb 20, 2018 · 1 comment
Open

Seems to loop #5

nomeata opened this issue Feb 20, 2018 · 1 comment
Labels

Comments

@nomeata
Copy link

nomeata commented Feb 20, 2018

I tried to use your library, and created this file:

<!DOCTYPE html>
<div id="chart"/>
<script src="//d3js.org/d3.v4.js"></script>
<script src="//rawgit.com/FabricioRHS/skd3/master/build/sk.d3.min.js"></script>
<link  href="//rawgit.com/FabricioRHS/skd3/master/build/sk.d3.min.css" rel="stylesheet" type="text/css" />
<style>
	#chart {
		height: 500px;
		width: 960px;
	}
</style>
<script>
var configSankey = {
	margin: { top: 10, left: 10, right: 10, bottom: 10 },
	nodes: {
		dynamicSizeFontNode: {
			enabled: true,
			minSize: 14,
			maxSize: 30
		},
		draggableX: false,
		draggableY: true,
		colors: d3.scaleOrdinal(d3.schemeCategory10)
	},
	links: {
		formatValue: function(val) {
			return d3.format(",.0f")(val) + ' TWh';
		}
	},
	tooltip: {
		infoDiv: true,
		labelSource: 'Input:',
		labelTarget: 'Output:'
	}
}

var data = {"links":[{"value":1,"source":1,"target":3},{"value":10,"source":3,"target":0},{"value":2,"source":3,"target":1},{"value":3,"source":3,"target":4},{"value":1,"source":3,"target":5},{"value":1,"source":3,"target":6},{"value":2,"source":5,"target":1},{"value":9,"source":5,"target":2},{"value":25,"source":5,"target":3},{"value":11,"source":5,"target":6},{"value":1,"source":6,"target":3}],"nodes":[{"value":10,"name":"Accepted"},{"value":3,"name":"Needs revision"},{"value":9,"name":"Out-of-scope"},{"value":10,"name":"Pending"},{"value":3,"name":"Rejected"},{"value":64,"name":"discussed"},{"value":11,"name":"dormant"}]};

var objSankey = sk.createSankey('#chart', configSankey, data);
</script>

but it seems to send my browser into an infinite loop.

Does your library support circular sankey graphs?

nomeata added a commit to nomeata/ghc-proposals-stats that referenced this issue Feb 20, 2018
but this one is not too happy with my data, it seems:
fabric-io-rodrigues/skd3#5
@fabric-io-rodrigues
Copy link
Owner

Hi @nomeata! Thanks for reporting, but lib does not support circular sankey graphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants