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
2798df5b
Commit
2798df5b
authored
Oct 12, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix color scale for colorsRelByBins
parent
21325521
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
+24
-16
sigmaUtils.js
tinawebJS/sigmaUtils.js
+24
-16
No files found.
tinawebJS/sigmaUtils.js
View file @
2798df5b
...
@@ -342,31 +342,36 @@ function clustersBy(daclass) {
...
@@ -342,31 +342,36 @@ function clustersBy(daclass) {
}
}
// for debug of colorsRelByBins
var
totalsPerBinMin
=
{
'-1000000'
:
0
,
'-75'
:
0
,
'-50'
:
0
,
'-25'
:
0
,
'-10'
:
0
,
'10'
:
0
,
'25'
:
0
,
'50'
:
0
,
'75'
:
0
,
'100'
:
0
,
'125'
:
0
,
'150'
:
0
}
// rewrite of clustersBy with binning and for attributes that can have negative float values
// rewrite of clustersBy with binning and for attributes that can have negative float values
function
colorsRelByBins
(
daclass
)
{
function
colorsRelByBins
(
daclass
)
{
cancelSelection
(
false
);
cancelSelection
(
false
);
// 1
3
colors
// 1
2
colors
var
binColors
=
[
var
binColors
=
[
"#005197"
,
//blue
"#005197"
,
//blue binMin -∞
// "#3c76fb",
"#3c76fb"
,
// binMin -75
"#5c8af2"
,
"#5c8af2"
,
// binMin -50
"#64c5f2"
,
"#64c5f2"
,
// binMin -25
"#64e0f2"
,
"#bae64f"
,
//epsilon binMin -10 binMin 10
"#bae64f"
,
//epsilon
"#f9f008"
,
// binMin 10
"#f9f008"
,
"#f9da08"
,
// binMin 25
"#f9da08"
,
"#fab207"
,
// binMin 50
"#fab207"
,
"#fa9607"
,
// binMin 75
"#fa9607"
,
"#fa6e07"
,
// binMin 100
"#fa6e07"
,
"#fa4607"
,
// red binMin 125
"#fa4607"
,
// red
"#991B1E"
// binMin 150
"#991B1E"
];
];
// spare color 13 "#64e0f2",
// £TODO calculate thresholds like eg d3.histogram
// £TODO calculate thresholds like eg d3.histogram
// var thresholdsMin = [-100,-75,-50,-25,-10,10,25,50,75,100,125,150, 1000000]
var
thresholdsMin
=
[
-
1000000
,
-
75
,
-
50
,
-
25
,
-
10
,
10
,
25
,
50
,
75
,
100
,
125
,
150
,
1000000
]
var
thresholdsMin
=
[
-
75
,
-
50
,
-
25
,
-
10
,
10
,
25
,
50
,
75
,
100
,
125
,
150
,
1000000
]
// get the nodes
// get the nodes
var
v_nodes
=
getVisibleNodes
();
var
v_nodes
=
getVisibleNodes
();
...
@@ -381,7 +386,10 @@ function colorsRelByBins(daclass) {
...
@@ -381,7 +386,10 @@ function colorsRelByBins(daclass) {
var
binMin
=
thresholdsMin
[
j
]
var
binMin
=
thresholdsMin
[
j
]
var
binMax
=
thresholdsMin
[(
j
+
1
)]
var
binMax
=
thresholdsMin
[(
j
+
1
)]
if
((
theVal
>=
binMin
)
&&
(
theVal
<
binMax
))
{
if
((
theVal
>=
binMin
)
&&
(
theVal
<
binMax
))
{
TW
.
partialGraph
.
_core
.
graph
.
nodesIndex
[
theId
].
binMin
=
binMin
TW
.
partialGraph
.
_core
.
graph
.
nodesIndex
[
theId
].
color
=
binColors
[
j
]
TW
.
partialGraph
.
_core
.
graph
.
nodesIndex
[
theId
].
color
=
binColors
[
j
]
totalsPerBinMin
[
binMin
]
++
break
break
}
}
}
}
...
...
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