Skip to content

Changed data labels rendering and offset calculation#257

Merged
Demonkratiy merged 5 commits intomicrosoft:mainfrom
v-aidaba:data-labels
Dec 23, 2025
Merged

Changed data labels rendering and offset calculation#257
Demonkratiy merged 5 commits intomicrosoft:mainfrom
v-aidaba:data-labels

Conversation

@v-aidaba
Copy link
Contributor

@v-aidaba v-aidaba commented Dec 2, 2025

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the data labels rendering system in the StreamGraph visual by replacing the legacy PowerBI data label utilities with a custom implementation. The changes add a new label overlap handling feature with three modes (Standard, Hide Overlap, Offset Overlap), improve label positioning logic, and update several dependencies.

Key Changes:

  • Replaced dataLabelUtils with custom label rendering logic that provides better control over label positioning and overlap detection
  • Added new label overlap handling setting with three modes to manage overlapping labels
  • Refactored localization to use ILocalizedItemMember interface for automatic localization support

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
test/visualTest.ts Added comprehensive test coverage for the three overlap handling modes and enum value formats
test/visualBuilder.ts Updated data labels selector to match new DOM structure (.data-labels-container)
stringResources/en-US/resources.resjson Added localization keys for new overlap handling options and reorganized file alphabetically
src/visual.ts Major refactoring: removed dataLabelUtils dependency, implemented custom label rendering with overlap detection algorithms, added style caching for performance
src/utils.ts Added LabelOverlapHandling enum to define the three overlap handling modes
src/streamGraphSettingsModel.ts Refactored to use ILocalizedItemMember for automatic localization, removed manual setLocalizedOptions method, added overlapHandling setting
src/dataInterfaces.ts Added LabelStyleProperties and LabelDataItem interfaces to support new label rendering architecture
src/behavior.ts Enhanced renderSelection to update label opacity based on highlight states, optimized with pre-calculated highlight states
package.json & package-lock.json Updated powerbi-visuals-utils-formattingutils (6.0.3→6.1.2) and powerbi-visuals-utils-formattingmodel (6.0.1→6.2.2) dependencies
capabilities.json Fixed displayNameKey references and added overlapHandling enumeration property
CHANGELOG.md Documented new features and fixes for version 3.2.0.0

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Demonkratiy Demonkratiy merged commit 3bcad01 into microsoft:main Dec 23, 2025
3 checks passed
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.

2 participants