Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
How to use DataLabelManager class to create datalabels in custom power bi visual?
Hi, @Anonymous
Here is the usage of 'DataLabelManager':powerbi-visuals-utils-chartutils/data-label-manager.md at master · microsoft/powerbi-visuals-utils-chartutils · GitHub
The DataLabelManager helps to create and maintain labels. It arranges label elements using the anchor point or rectangle. Collisions between elements can be automatically detected and as a result elements can be repositioned or get hidden.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dear Janey,
Thank you for your response. I have followed the code but unable to understand how I can show customized data labels on bar chart. Tis article only shows how to get the datalabel, but I would require more info on how we can display the datalabels on bar chart.
Hi, @Anonymous
Here are some references:
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dear Janey,
Thank you once again for your reply.
I would require an example where datalabels should be shown on bar chart using custom visual. I have already created one bar chart, but not able to understand how to incorporate DataLabels and Legends into it.
If I could get any code reference then it's highly helpful.
Hi, @Anonymous
You can domnload a sample here.
GitHub - microsoft/PowerBI-visuals-sampleBarChart: Bar Chart Custom Visual for tutorial.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dear Janey,
Thank you for sharing the information.
I have issue with below line of code while adding legend data.
Can you please let me know where i'm doing wrong parameter insertion?
Hi, @Anonymous
Can you share a screenshot of the error message?
You can also try e-mail contact: pbicvsupport@microsoft.com They are professional.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
60 | |
58 | |
54 | |
36 | |
33 |
User | Count |
---|---|
79 | |
66 | |
45 | |
44 | |
42 |