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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register 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
Anonymous
Not applicable

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

Hello, @Anonymous,

 

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.