Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
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
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
2afdb628
Commit
2afdb628
authored
Apr 16, 2013
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better colorization of heatmap
Use `interpolateHcl` because that's hella easy.
parent
6167eb22
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
heatmap.coffee
h/js/plugin/heatmap.coffee
+4
-5
No files found.
h/js/plugin/heatmap.coffee
View file @
2afdb628
...
...
@@ -43,11 +43,10 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin
_colorize
:
(
v
)
->
c
=
d3
.
scale
.
pow
().
exponent
(
2
)
.
range
([
0
,
10
])
l
=
d3
.
scale
.
pow
().
exponent
(.
5
)
.
domain
([
0
,
1
])
.
range
([
100
,
50
])
d3
.
hcl
(
270
,
c
(
v
),
l
(
v
)).
toString
()
.
range
([
'powderblue'
,
'darkblue'
])
.
interpolate
(
d3
.
interpolateHcl
)
c
(
v
).
toString
()
updateHeatmap
:
(
data
)
=>
return
unless
d3
?
...
...
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