mattflor / chorddiag

R interface to D3 chord diagrams
159 stars 44 forks source link

conditional display of tooltip? #4

Closed jaehyeon-kim closed 8 years ago

jaehyeon-kim commented 8 years ago

Hi

I find this package quite handy.

Sometimes there is no value from right to left and, in this case, it might be better not to show. Specifically the tooltip shows the following when right to left is 0.

# original A -> B: 2.15% B -> A: 0%

If the line 86 of chorddiag.js is modified as following, the second line is not shown as following.

#86 of chorddiag.js return dir1 + (vji > 0 ? "</br>" + dir2 : "");

# modified A -> B: 2.15%

I wonder if an option to hide tooltip entry when value is 0 may be good.

Thanks.

Regards Jaehyeon

mattflor commented 8 years ago

Hi @jaehyeon-kim, sorry for the delayed reply. I haven't yet found the time to look into your suggestion but I'll probably manage this week...