Cubism.JS threshold scale doesn't work -
i'm using cubism data coming graphite
the data's domain continuos [0,100] , range continuos [0,100] below 100 nonsense modified scale , used threshold scale that:
values < 100 0 , 100 100. tested with:
var scale = d3.scale.threshold().domain([100]).range([0,100]) console.log(scale(1)) //returns 0 console.log(scale(99.9)) //returns 0 console.log(scale(88.9)) //returns 0 console.log(scale(100)) //returns 100
when apply it, whole chart becomes empty
.call(context.horizon().height(100) .colors(colors) .scale(d3.scale.threshold().domain([100]).range([0,100])) // range([0,1]) doesn't work either );
without applying scale (notice small white area)
.call(context.horizon().height(100) .colors(colors) // .scale(d3.scale.threshold().domain([100]).range([0,100])) // range([0,1]) doesn't work either );
scale didn't work used graphite's functions
specifically used
removeabovevalue(keeplastvalue(xxx),99.99999)
Comments
Post a Comment