visjs-extras-groupsequence

WebJar for visjs-extras-groupsequence

License

License

MIT
Categories

Categories

JavaScript Languages Github Development Tools Version Controls
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-thiagodnf-visjs-extras-groupsequence
Last Version

Last Version

1.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

visjs-extras-groupsequence
WebJar for visjs-extras-groupsequence
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/thiagodnf/visjs-extras-groupsequence

Download github-com-thiagodnf-visjs-extras-groupsequence

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-thiagodnf-visjs-extras-groupsequence/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-thiagodnf-visjs-extras-groupsequence</artifactId>
    <version>1.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-thiagodnf-visjs-extras-groupsequence/
implementation 'org.webjars.npm:github-com-thiagodnf-visjs-extras-groupsequence:1.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-thiagodnf-visjs-extras-groupsequence/
implementation ("org.webjars.npm:github-com-thiagodnf-visjs-extras-groupsequence:1.1.1")
'org.webjars.npm:github-com-thiagodnf-visjs-extras-groupsequence:jar:1.1.1'
<dependency org="org.webjars.npm" name="github-com-thiagodnf-visjs-extras-groupsequence" rev="1.1.1">
  <artifact name="github-com-thiagodnf-visjs-extras-groupsequence" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-thiagodnf-visjs-extras-groupsequence', version='1.1.1')
)
libraryDependencies += "org.webjars.npm" % "github-com-thiagodnf-visjs-extras-groupsequence" % "1.1.1"
[org.webjars.npm/github-com-thiagodnf-visjs-extras-groupsequence "1.1.1"]

Dependencies

compile (5)

Group / Artifact Type Version
org.webjars.npm : connect jar [3.6.6,4)
org.webjars.npm : network jar [0.4.1,0.5)
org.webjars.npm : livereload jar [0.9.1,0.10)
org.webjars.npm : serve-static jar [1.13.2,2)
org.webjars.npm : winston jar [2.4.2,3)

Project Modules

There are no modules declared in this project.

logo

A Vis.js layout extension for formatting nodes in a sequence or group sequence.

GitHub Release GitHub contributors GitHub stars MIT Licence Open Source Love

Features

  • Aggregate the nodes in groups
  • Use a "head" node to display the group's name
  • Select which node's property should be used to grouping

Screenshot

Groups activated

screenshot

Groups disactived

screenshot

Requirements

Updated versions of these toolsets may break the build or app. If you have issues, try mirroring these exact versions.

  • Vis.js 7.6.4

Getting Started

Online access

Click on the on the link below for seeing this tool in action.

https://thiagodnf.github.io/visjs-extras-groupsequence/

Usage

Include the javascript file in your html file

<script type="text/javascript" src="src/group-sequence.js"></script>

and call the class before sending the nodes the vis-network

let gsOptions = {};

let layout  = new GroupSequence(gsOptions);

graph = layout.process(graph);

var data = {
    nodes: new vis.DataSet(graph.nodes),
    edges: new vis.DataSet(graph.edges)
};

var options = {
    physics: false
};

var network = new vis.Network($container[0] , data, options);

Warning! Don't forget to set physics: false

Parameters

The default options are:

let defaultOptions = {
    horizontalSpacing: 120,
    verticalSpacing: 100,
    useHead: true,
    useGroups: true,
    sortGroups: true,
    sortNodeIds: true,
    direction: "LR",
    smoothRoundnessRange: 0.09,
    useSmooth: true,
    groupNodeBy: "group",
}

The individual options are explained below.

Name Type Default Description
horizontalSpacing number 120 The horizontal distance among nodes
verticalSpacing number 100 The vertical distance among nodes
useHead boolean true Active the use of head nodes
useGroups boolean true Active the use of groups
sortGroups boolean true Active if the groups should be sorted
sortNodeIds boolean true Active if the nodes should be sorted
direction string "LR" Define the direction. Available options LR and RL
smoothRoundnessRange number 0.09 The size of edge's roundness
useSmooth boolean true Active the use of edge's smooth
groupNodeBy string "group" Define the properties used for grouping

Questions or Suggestions

Feel free to create issues here as you need

Contribute

Contributions to the this project are very welcome! We can't do this alone! Feel free to fork this project, work on it and then make a pull request.

Authors

  • Thiago Ferreira - Initial work

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Donate

I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).

However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:

Buy Me A Coffee

Thanks! ❤️

Versions

Version
1.1.1
1.0.0