Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
italodoliva
New Member

Auto Position Category Labels to Prevent Overlapping

Hello, everyone,

 

I'm creating a custom scatterplot and one of the features I wanted to bring from the native scatterplot is category labels. The problem is that many labels are overlapping, cluttering the chart.

 

I saw DataLabelManager from Chart Utils has a method called hideCollidedLabels that might help me rearrange the labels and hide it on the last instance, but I'm not finding a way to use it properly and I can't find an example of how to use it.

 

Could you help me with any snippets or suggestions, please?

 

Best,

Italo

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @italodoliva,

I'd like to suggest you take a look at the official document about the chart utils, it mentions the 'hideCollidedLabels' definitions and usage sample:

Introduction to use chart utils in Power BI visual - Power BI | Microsoft Learn

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hello, @v-shex-msft,

 

Thanks for your answer.

 

I knew about hideCollidedLabels on this section of the documentation. The problem is the usage sample lacks a lot of important information. For example, what's the format of the content inside the values variable? We can not see the sample values, just the name of the variable. Also, how would the DataLabelManager know how to find the category labels in the SVG given its data?

 

Do you know any other source that uses hideCollidedLabels?

 

Thank you,

Italo

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.