Commit 2afdb628 authored by Randall Leeds's avatar Randall Leeds

better colorization of heatmap

Use `interpolateHcl` because that's hella easy.
parent 6167eb22
...@@ -43,11 +43,10 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin ...@@ -43,11 +43,10 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin
_colorize: (v) -> _colorize: (v) ->
c = d3.scale.pow().exponent(2) c = d3.scale.pow().exponent(2)
.range([0, 10]) .domain([0, 1])
l = d3.scale.pow().exponent(.5) .range(['powderblue', 'darkblue'])
.domain([0, 1]) .interpolate(d3.interpolateHcl)
.range([100, 50]) c(v).toString()
d3.hcl(270, c(v), l(v)).toString()
updateHeatmap: (data) => updateHeatmap: (data) =>
return unless d3? return unless d3?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment