Skip to content

Add images just next to the text or label #79

@iamsrujal

Description

@iamsrujal

I want to add an image with text or label in chord diagram
I have used layout, highlight and chords method for creating this diagram.

Sample Code:-
GRCh37 is my outer data
cytobands are my inner data
data is used for creating connection

          .layout(
            GRCh37,
            {
              innerRadius: width / 2 - 180,
              outerRadius: width / 2 - 140,
              labels: {
                radialOffset: 70
              },
              ticks: {
                display: true,
                labelDenominator: 1000000
              },
            }
          )
         .highlight('cytobands', cytobands, {
            innerRadius: width / 2 - 180,
            outerRadius: width / 2 - 140,
            opacity: 0.4,
            color: function (d) {
              return gieStainColor[d.gieStain]
            }
          })
          .chords(
            'l1',
            data,
            {
              min: 1,
              max: 1,
              logScale: true,
              opacity: 1,
              color: '#000000',
              tooltipContent: function (d) {
                return '<h3>' + d.source.name + ' ➤ ' + d.target.name + '</h3>';
              }
            }
          )
          .render()

Screenshot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions