Skip to content
This repository was archived by the owner on Nov 9, 2019. It is now read-only.

Conversation

@victor-nitu
Copy link

Add support for:

  • node size (value)
  • edge thickness (value)
  • edge color (color)

Now it's possible to provide an already build array of nodes AND an array of edges like this:

{{#visjs-network options=networkOptions nodesSet=model.graph.nodes edgesSet=model.graph.edges}}
{{/visjs-network}}

And also like this:

{{#visjs-network options=networkOptions}}
  {{#each model.graph.nodes as |node|}}
      {{visjs-node nId=node.id label=node.label value=node.value color='rgb(39,239,252)'}}
  {{/each}}
  {{#each model.graph.edges as |edge|}}
    {{visjs-edge from=edge.from to=edge.to value=edge.value color='rgb(49,57,57)'}}
  {{/each}}
{{/visjs-network}}

I haven't tested what happens if you provide both, probably some exception should be raised not allowing it, or maybe the component nodes/edges defined via hbs should be added to the provided arrays. To be determined :-)

Thanks for all the work on this, I'm going to remove my previously created PRs that are now a part of this bigger, improved one.

This was referenced May 29, 2016
@navkast
Copy link

navkast commented Sep 26, 2017

@Suven - do you still maintain this? This looks like a good feature.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants