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
93b5fcd4
Commit
93b5fcd4
authored
Apr 20, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
age attribute mapped to 6 colors from yellow to red
parent
5f2ca2fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
sigmaUtils.js
tinawebJS/sigmaUtils.js
+10
-2
No files found.
tinawebJS/sigmaUtils.js
View file @
93b5fcd4
...
@@ -798,7 +798,7 @@ function colorsRelByBins(daclass) {
...
@@ -798,7 +798,7 @@ function colorsRelByBins(daclass) {
TW
.
handpickedcolor
=
true
TW
.
handpickedcolor
=
true
var
nTicksParam
=
12
var
nTicksParam
=
(
daclass
==
'age'
)
?
6
:
12
// do first loop entirely to get percentiles => bins, then modify alt_color
// do first loop entirely to get percentiles => bins, then modify alt_color
// estimating ticks
// estimating ticks
...
@@ -851,8 +851,16 @@ function colorsRelByBins(daclass) {
...
@@ -851,8 +851,16 @@ function colorsRelByBins(daclass) {
// tickThresholds = [-1000000,-75,-50,-25,-15,15,25,50,75,100,125,150, 1000000]
// tickThresholds = [-1000000,-75,-50,-25,-15,15,25,50,75,100,125,150, 1000000]
// £TODO put colors and thresholds as params or calculate thresholds like eg d3.histogram
if
(
daclass
==
'age'
)
{
if
(
daclass
==
'age'
)
{
binColors
=
[
"#f9f008"
,
//yel
"#f9da08"
,
"#fab207"
,
"#fa9607"
,
"#fa6e07"
,
"#fa4607"
// red binMin 125
];
// and add a grey color for the first timeperiod
// and add a grey color for the first timeperiod
binColors
.
unshift
(
"#F9F7ED"
)
binColors
.
unshift
(
"#F9F7ED"
)
...
...
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