mirror of https://gitee.com/bigwinds/arangodb
colors, gv
This commit is contained in:
parent
f9f96e765a
commit
4150fa7ec7
|
@ -298,6 +298,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
'#FFD86E',
|
'#FFD86E',
|
||||||
'#A5ABB6'
|
'#A5ABB6'
|
||||||
],
|
],
|
||||||
|
jans: ['rgba(0,117,220,1)', 'rgba(153,63,0,1)', 'rgba(76,0,92,1)', 'rgba(25,25,25,1)', 'rgba(0,92,49,1)', 'rgba(43,206,72,1)', 'rgba(255,204,153,1)', 'rgba(128,128,128,1)', 'rgba(148,255,181,1)', 'rgba(143,124,0,1)', 'rgba(157,204,0,1)', 'rgba(194,0,136,1)', 'rgba(0,51,128,1)', 'rgba(255,164,5,1)', 'rgba(255,168,187,1)', 'rgba(66,102,0,1)', 'rgba(255,0,16,1)', 'rgba(94,241,242,1)', 'rgba(0,153,143,1)', 'rgba(224,255,102,1)', 'rgba(116,10,255,1)', 'rgba(153,0,0,1)', 'rgba(255,255,128,1)', 'rgba(255,255,0,1)', 'rgba(255,80,5,1)'],
|
||||||
highContrast: [
|
highContrast: [
|
||||||
'#EACD3F',
|
'#EACD3F',
|
||||||
'#6F308A',
|
'#6F308A',
|
||||||
|
@ -322,6 +323,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
'#2A3415'
|
'#2A3415'
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
// var traversal = require("@arangodb/graph/traversal");
|
// var traversal = require("@arangodb/graph/traversal");
|
||||||
|
|
||||||
var graph = gm._graph(name);
|
var graph = gm._graph(name);
|
||||||
|
@ -485,7 +487,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
if (tmpObjEdges.hasOwnProperty(coll)) {
|
if (tmpObjEdges.hasOwnProperty(coll)) {
|
||||||
edgeObj.color = tmpObjEdges[coll];
|
edgeObj.color = tmpObjEdges[coll];
|
||||||
} else {
|
} else {
|
||||||
tmpObjEdges[coll] = colors.default[Object.keys(tmpObjEdges).length];
|
tmpObjEdges[coll] = colors.jans[Object.keys(tmpObjEdges).length];
|
||||||
edgeObj.color = tmpObjEdges[coll];
|
edgeObj.color = tmpObjEdges[coll];
|
||||||
}
|
}
|
||||||
} else if (config.edgeColorAttribute !== '') {
|
} else if (config.edgeColorAttribute !== '') {
|
||||||
|
@ -494,7 +496,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
if (tmpObjEdges.hasOwnProperty(attr)) {
|
if (tmpObjEdges.hasOwnProperty(attr)) {
|
||||||
edgeObj.color = tmpObjEdges[attr];
|
edgeObj.color = tmpObjEdges[attr];
|
||||||
} else {
|
} else {
|
||||||
tmpObjEdges[attr] = colors.default[Object.keys(tmpObjEdges).length];
|
tmpObjEdges[attr] = colors.jans[Object.keys(tmpObjEdges).length];
|
||||||
edgeObj.color = tmpObjEdges[attr];
|
edgeObj.color = tmpObjEdges[attr];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -547,7 +549,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
if (tmpObjNodes.hasOwnProperty(coll)) {
|
if (tmpObjNodes.hasOwnProperty(coll)) {
|
||||||
nodeObj.color = tmpObjNodes[coll];
|
nodeObj.color = tmpObjNodes[coll];
|
||||||
} else {
|
} else {
|
||||||
tmpObjNodes[coll] = colors.default[Object.keys(tmpObjNodes).length];
|
tmpObjNodes[coll] = colors.jans[Object.keys(tmpObjNodes).length];
|
||||||
nodeObj.color = tmpObjNodes[coll];
|
nodeObj.color = tmpObjNodes[coll];
|
||||||
}
|
}
|
||||||
} else if (config.nodeColorAttribute !== '') {
|
} else if (config.nodeColorAttribute !== '') {
|
||||||
|
@ -556,7 +558,7 @@ authRouter.get('/graph/:name', function (req, res) {
|
||||||
if (tmpObjNodes.hasOwnProperty(attr)) {
|
if (tmpObjNodes.hasOwnProperty(attr)) {
|
||||||
nodeObj.color = tmpObjNodes[attr];
|
nodeObj.color = tmpObjNodes[attr];
|
||||||
} else {
|
} else {
|
||||||
tmpObjNodes[attr] = colors.default[Object.keys(tmpObjNodes).length];
|
tmpObjNodes[attr] = colors.jans[Object.keys(tmpObjNodes).length];
|
||||||
nodeObj.color = tmpObjNodes[attr];
|
nodeObj.color = tmpObjNodes[attr];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
colors: {
|
colors: {
|
||||||
hotaru: ['#364C4A', '#497C7F', '#92C5C0', '#858168', '#CCBCA5'],
|
hotaru: ['#364C4A', '#497C7F', '#92C5C0', '#858168', '#CCBCA5'],
|
||||||
random1: ['#292F36', '#4ECDC4', '#F7FFF7', '#DD6363', '#FFE66D'],
|
random1: ['#292F36', '#4ECDC4', '#F7FFF7', '#DD6363', '#FFE66D'],
|
||||||
|
jans: ['rgba(0,117,220,1)', 'rgba(153,63,0,1)', 'rgba(76,0,92,1)', 'rgba(25,25,25,1)', 'rgba(0,92,49,1)', 'rgba(43,206,72,1)', 'rgba(255,204,153,1)', 'rgba(128,128,128,1)', 'rgba(148,255,181,1)', 'rgba(143,124,0,1)', 'rgba(157,204,0,1)', 'rgba(194,0,136,1)', 'rgba(0,51,128,1)', 'rgba(255,164,5,1)', 'rgba(255,168,187,1)', 'rgba(66,102,0,1)', 'rgba(255,0,16,1)', 'rgba(94,241,242,1)', 'rgba(0,153,143,1)', 'rgba(224,255,102,1)', 'rgba(116,10,255,1)', 'rgba(153,0,0,1)', 'rgba(255,255,128,1)', 'rgba(255,255,0,1)', 'rgba(255,80,5,1)'],
|
||||||
gv: [
|
gv: [
|
||||||
'#68BDF6',
|
'#68BDF6',
|
||||||
'#6DCE9E',
|
'#6DCE9E',
|
||||||
|
@ -299,7 +300,7 @@
|
||||||
|
|
||||||
_.each(tmpNodes, function (node, key) {
|
_.each(tmpNodes, function (node, key) {
|
||||||
if (self.collectionColors[key.split('/')[0]] === undefined) {
|
if (self.collectionColors[key.split('/')[0]] === undefined) {
|
||||||
self.collectionColors[key.split('/')[0]] = {color: self.colors.gv[pos]};
|
self.collectionColors[key.split('/')[0]] = {color: self.colors.jans[pos]};
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -307,7 +308,7 @@
|
||||||
pos = 0;
|
pos = 0;
|
||||||
_.each(tmpEdges, function (edge, key) {
|
_.each(tmpEdges, function (edge, key) {
|
||||||
if (self.collectionColors[key.split('/')[0]] === undefined) {
|
if (self.collectionColors[key.split('/')[0]] === undefined) {
|
||||||
self.collectionColors[key.split('/')[0]] = {color: self.colors.gv[pos]};
|
self.collectionColors[key.split('/')[0]] = {color: self.colors.jans[pos]};
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -267,3 +267,7 @@
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#objectCount {
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue