GeneTonic icon indicating copy to clipboard operation
GeneTonic copied to clipboard

divergent colorBar in DT table centred on 0.5

Open rb643 opened this issue 3 years ago • 1 comments

Amazing resource! My JS is a little rusty but would it be possible to create a divergent colorbar that is centred on 0.5 and ranges [0,1]?

I am not sure how to adapt the sprintf JS lines in the function to do that?

rb643 avatar Nov 17 '22 21:11 rb643

Hi Richard @rb643 , You can see from the source code itself that my js-fu is also not so optimal. The solution I took is inspired by the answer I found on StackOverflow: https://stackoverflow.com/questions/33521828/stylecolorbar-center-and-shift-left-right-dependent-on-sign/33524422#33524422 Probably it is possible to "simply" adapt that? Still, goes beyond my knowledge of javascript 😞

federicomarini avatar Nov 22 '22 11:11 federicomarini