nicgirault / circosJS

d3 library to build circular graphs
MIT License
505 stars 117 forks source link

tooltipContent on chords chart #70

Open lmalet opened 5 years ago

lmalet commented 5 years ago

Hi, I'm trying to understand the "chords.js" file, because I would like to integrate it in a Dash App.

My issue is when I mouse over a chord, I can see the source Chr and the target Chr, but there is no value, it says "undefined". Is it normal? Does it use the data of the "fusion-gene,csv" file?

And I don't understand this:

      tooltipContent: function (d) {
        return '<h3>' + d.source.id + ' ➤ ' + d.target.id + ': ' + d.value + '</h3><i>(CTRL+C to copy to clipboard)</i>'
      },

particularly the " d.source.id" and the "d.target.id", I don't quiet understand where it comes from.

I have to inform you that I am a beginner in Javascript, I still have a lot to learn!

Thanks in advance!

iamsrujal commented 4 years ago

This d.source.id comes from fusionJSON Object Array...