This repository was archived by the owner on Jul 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtank.settings.js
95 lines (79 loc) · 2.75 KB
/
tank.settings.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
;(function (undefined) {
'use strict';
if (typeof tank === 'undefined')
throw 'tank is not declared';
// Packages initialization:
sigma.utils.pkg('tank.settings');
var settings = {
// id of the dom element
id: 'tank-container',
// default query
query: {
title: 'Get some data',
query: 'MATCH (n) OPTIONAL MATCH (n)-[r]->(m) RETURN n,r,m LIMIT 1'
},
// Custom labels & types array
labels: [], // must contain object like { name: 'my label' , color : '#FFFFFF', size:1}
types: [], // must contain object like { name: 'my type' , color : '#FFFFFF', size:1, shape:'curve' }
// Plugin list
// ===========================
plugins: ['query', 'codemirror', 'favorite', 'history', 'config' , 'stats', 'data', 'graphtools', 'sigma_dragnode', 'discoverGraph'],
// General config
// ===========================
// Neo4j url
neo4j : {
url : 'http://localhost:7474',
user: 'neo4j',
password: 'admin'
},
// List of favorites query
favorites: [],
// Table of field that can be used of label on graph
field_named: ['title', 'name' , 'label'],
// Node size depend of their degrees ?
node_relative_size: false,
default_node_size : 5,
default_edge_size : 2,
default_edge_shape : 'tapered',
// Sigmajs config
// ============================
sigmajs: {
minNodeSize: 0,
maxNodeSize: 10,
minEdgeSize: 0.1,
maxEdgeSize: 5,
defaultEdgeType: 'tapered',
enableEdgeHovering: true,
edgeHoverSizeRatio: 1,
edgeHoverExtremities: true,
drawLabels: true,
drawEdgeLabels: false,
doubleClickEnabled: false
},
// Force atlas2 algo default time
forceAtlas2Time: 5000,
// Force atalas2 configuration
forceAtlas2 : {
linLogMode: false,
outboundAttractionDistribution: false,
adjustSizes: false,
edgeWeightInfluence: 0,
scalingRatio: 1,
strongGravityMode: false,
gravity: 1,
slowDown: 1,
barnesHutOptimize: true,
barnesHutTheta: 0.5,
startingIterations: 1,
iterationsPerRender: 1
},
// Configuration for plugin graphtool
graphtools : {
ratioCoef : 1.5,
rotateStep: 0.05,
animationDuration : 150
}
};
// Export the previously designed settings:
tank.settings = sigma.utils.extend(tank.settings || {}, settings);
}).call(this);