GeneTonic
GeneTonic copied to clipboard
divergent colorBar in DT table centred on 0.5
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?
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 😞