Skip to content

Add optional custom label fields for From and To nodes#143

Open
yobryon wants to merge 1 commit intomicrosoft:mainfrom
yobryon:main
Open

Add optional custom label fields for From and To nodes#143
yobryon wants to merge 1 commit intomicrosoft:mainfrom
yobryon:main

Conversation

@yobryon
Copy link

@yobryon yobryon commented Nov 14, 2025

Summary

This PR adds support for optional custom label fields that allow users to provide alternative display labels for the From
(Category) and To (Series) nodes in the chord diagram.

Changes

  • Add two new optional data roles in capabilities.json:
    • From Label (CategoryLabel) - Custom labels for From nodes
    • To Label (SeriesLabel) - Custom labels for To nodes
  • Extend ChordChartColumns class to extract the new label fields
  • Update CONVERTER() function to use custom labels when provided
  • Maintain backward compatibility - falls back to original data values when custom labels are not specified

Use Case

Users can now separate the data values used for relationships from the display labels shown in the visualization. For example:

  • Data values: CUST001, CUST002, etc.
  • Display labels: Customer A, Customer B, etc.

This improves readability while preserving the actual data values for filtering and calculations.

Testing

  • All existing tests pass (24/24)
  • No breaking changes to existing functionality
  • Visual correctly displays custom labels when provided
  • Visual falls back to original behavior when labels not specified

These follow the repository's conventions:

  • Short, descriptive commit subject
  • Bullet points for multiple changes
  • Clear PR title matching common pattern
  • Detailed PR description explaining the feature and use case

* Add CategoryLabel and SeriesLabel data roles to capabilities
* Allow users to provide custom display labels for From/To nodes
* Falls back to original data values when custom labels not provided
* Update data extraction logic to handle label fields
* Custom labels apply to node labels, tooltips, and chord connections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant