Skip to content

Create force data structure for force graphs of sankeys from array of objects.

License

Notifications You must be signed in to change notification settings

Reterics/array-to-relational-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Array to Relational Converter

We can create Relational Data ({ nodes, links }) for graphs from Array of Objects. ([ {}, {} ])

For Relation based graphs, like Force Graph or Sankey we need to have this kind of data structure. Very useful for D3 js visualisations.


##Usage You can find example usage in example.js too. ###Method name: createForceFromArray()

const result = createForceFromArray(data, {
	paths:[
		{
			source:'sourceKey',
			target:'targetKey',
		},
		{
			source:'secondSourceKey',
			target:'secondTargetKey'
		}
	],
	circular:false,
	targetType:"id", //This can be 'id' or 'name' or 'reference'
	includedKeys:['extra'] //Keys connected to nodes
});

#Roadmap


Documentation is not detailed yet, because the project in under construction, but i will put more examples and explanation here and in my webpage.

About

Create force data structure for force graphs of sankeys from array of objects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published