Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
david Chavalarias
clinicaltrials
Commits
5a60b0d9
Commit
5a60b0d9
authored
Sep 16, 2014
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
color nodes
parent
85f5697f
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
273 additions
and
10 deletions
+273
-10
explorerjs.html
explorerjs.html
+14
-3
glyphicons.html
glyphicons.html
+241
-0
colors.png
img/colors.png
+0
-0
main.js
tinawebJS/js/main.js
+6
-1
sigmaUtils.js
tinawebJS/js/sigmaUtils.js
+12
-6
No files found.
explorerjs.html
View file @
5a60b0d9
...
...
@@ -148,11 +148,22 @@
</ul>
<ul
class=
"nav navbar-nav navbar-right"
>
<li><a>
<button
id=
"clustbyCC"
>
Clusterize
</button>
</a></li>
<li
class=
"dropdown"
>
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<img
title=
"Set Colors"
src=
"img/colors.png"
width=
"20px"
><b
class=
"caret"
></b></img>
</a>
<ul
class=
"dropdown-menu"
>
<li><a
href=
"#"
id=
"colorbyCC"
>
By Country
</a></li>
<li><a
href=
"#"
><strike>
By Acronym
</strike></a></li>
<li><a
href=
"#"
id=
"colorbyDef"
>
By Default
</a></li>
<li
class=
"divider"
></li>
<li><a
href=
"#"
>
<span
class=
"glyphicon glyphicon-repeat"
></span>
<strike>
Properties
</strike></a></li>
</ul>
</li>
</ul>
</div>
<!--
...
...
glyphicons.html
0 → 100644
View file @
5a60b0d9
This diff is collapsed.
Click to expand it.
img/colors.png
0 → 100644
View file @
5a60b0d9
346 KB
tinawebJS/js/main.js
View file @
5a60b0d9
...
...
@@ -681,10 +681,15 @@ function theListeners(){
});
$
(
"#c
lust
byCC"
).
click
(
function
(){
$
(
"#c
olor
byCC"
).
click
(
function
(){
clustersBy
(
"country"
);
});
$
(
"#colorbyDef"
).
click
(
function
(){
clustersBy
(
"default"
);
});
$
.
doTimeout
(
10
,
function
(){
var
deftoph
=
$
(
"#defaultop"
).
height
();
var
refh
=
$
(
"#fixedtop"
).
height
();
...
...
tinawebJS/js/sigmaUtils.js
View file @
5a60b0d9
...
...
@@ -164,7 +164,7 @@ function getCountries(){
}
function
clustersBy
(
daclass
)
{
if
(
daclass
==
"country"
)
{
if
(
daclass
==
"country"
)
{
CCs
=
getCountries
()
CCxID
=
{}
...
...
@@ -173,19 +173,25 @@ function clustersBy(daclass) {
CCxID
[
code
]
=
parseInt
(
i
);
}
pr
(
CCxID
)
var
nodes
=
getVisibleNodes
();
colorList
.
sort
(
function
(){
return
Math
.
random
()
-
0.5
;
});
pr
(
colorList
);
//
pr(colorList);
for
(
var
i
in
nodes
)
{
cc
=
nodes
[
i
].
attr
[
"CC"
]
if
(
!
isUndef
(
cc
)
&&
cc
!=
"-"
)
{
nodes
[
i
].
color
=
colorList
[
CCxID
[
cc
]
];
}
}
}
partialGraph
.
refresh
()
partialGraph
.
draw
();
if
(
daclass
==
"default"
)
{
var
nodes
=
getVisibleNodes
();
for
(
var
i
in
nodes
)
{
nodes
[
i
].
color
=
Nodes
[
nodes
[
i
].
id
].
color
;
}
}
partialGraph
.
refresh
()
partialGraph
.
draw
();
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment