Skip to content

Error on align types #34

Description

@harisbal

Hello,

I'm facing a weird bug when I try to align different links. It seems that for some reason including numbers in the type name causes some issues.
Example:
The following doesn't work properly

d1 = [
 {'source': 'start', 'target': 'E02000314_1', 'value': 32.0, 'type': 't41037'},
 {'source': 'E02000314_1', 'target': 'E09000025_2', 'value': 32.0, 'type': 't41037'},
 {'source': 'E09000025_2', 'target': 'end', 'value': 32.0, 'type': 't41037'},
    
 {'source': 'start', 'target': 'E02000313_1', 'value': 15.0, 'type': 't39174'},
 {'source': 'E02000313_1', 'target': 'E09000025_2', 'value': 15.0, 'type': 't39174'},
 {'source': 'E09000025_2', 'target': 'E02000321_3', 'value': 15.0, 'type': 't39174'},
 {'source': 'E02000321_3', 'target': 'end', 'value': 15.0, 'type': 't39174'}]

sankey(links=d1, align_link_types=True)

while this does:

d2 = [
 {'source': 'start', 'target': 'E02000314_1', 'value': 32.0, 'type': 'Α'},
 {'source': 'E02000314_1', 'target': 'E09000025_2', 'value': 32.0, 'type': 'Α'},
 {'source': 'E09000025_2', 'target': 'end', 'value': 32.0, 'type': 'Α'},
    
 {'source': 'start', 'target': 'E02000313_1', 'value': 15.0, 'type': 'Β'},
 {'source': 'E02000313_1', 'target': 'E09000025_2', 'value': 15.0, 'type': 'Β'},
 {'source': 'E09000025_2', 'target': 'E02000321_3', 'value': 15.0, 'type': 'Β'},
 {'source': 'E02000321_3', 'target': 'end', 'value': 15.0, 'type': 'Β'}]

sankey(links=d2, align_link_types=True)

I'm happy to try and find a solution but I'd need some initial guidance as to where I should look for. I have a feeling this is an issue of js rather than python right?

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions