d3-sankey icon indicating copy to clipboard operation
d3-sankey copied to clipboard

Feature request: Allow for a node title that's different than the node ID

Open contentfree opened this issue 8 months ago • 0 comments

Node's need to have unique IDs to work, but that's not necessarily the desired way to display them in the graph.

For example, I have this data:

source,target,count
,Original,1303689
Original,Scrubbed: ccg,65612
Original,Treatable,1238077
Treatable,1: SUBMITTED,795
Treatable,1: VPE_WEBHOOK_SENT,1242372
1: VPE_WEBHOOK_SENT,2: DELIVERED,1064130
1: VPE_WEBHOOK_SENT,2: EXPIRED,87464
1: VPE_WEBHOOK_SENT,2: FORWARDED,4585
1: VPE_WEBHOOK_SENT,2: INTERNAL_SUBMIT_FAILED,555
1: VPE_WEBHOOK_SENT,2: PERSONALIZATION_FAILED,75606
1: VPE_WEBHOOK_SENT,2: REJECTED,1280
1: VPE_WEBHOOK_SENT,2: REQUEST_INVALID,17
1: VPE_WEBHOOK_SENT,2: SUBMIT_FAILED,1165
1: VPE_WEBHOOK_SENT,2: SUBMITTED,111
1: VPE_WEBHOOK_SENT,2: TRANSCODE_FAILED,7
1: VPE_WEBHOOK_SENT,2: VPE_WEBHOOK_SENT,18
1: VPE_WEBHOOK_SENT,2: WEBHOOK_SENT,1
2: DELIVERED,3: DELIVERED,21146
2: DELIVERED,3: EXPIRED,1
2: DELIVERED,3: FORWARDED,23
2: DELIVERED,3: INTERNAL_SUBMIT_FAILED,2
2: DELIVERED,3: PERSONALIZATION_FAILED,1
2: DELIVERED,3: REQUEST_INVALID,8175
2: DELIVERED,3: SUBMITTED,443
2: DELIVERED,3: UNKNOWN,277
2: DELIVERED,3: WEBHOOK_SENT,1

Those numbers in the source and target are important to distinguish between steps in the flow, but I'd like to strip them away in the graph.

Can we get a nodeTitle transformer?

contentfree avatar Jun 06 '24 14:06 contentfree