Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Scenario:
There are various types of visuals in Power BI that we can use to create a beautiful report to get business insights from data. However, sometimes a visual may not be able to satisfy some certain requirements. If it is an open-sourced visual, you may have a choice to modify its code to meet your specific requirement. In this article, I will take Gantt 2.2.3 chart as an example.
A customer recently used Gantt 2.2.3 charts in Power BI Desktop and the customer noticed that the maximum number of its tooltips was 3. When trying to put more fields in it, it shows yellow lines and it doesn't seem to allow any more fields to be added to it. Below I will explore how to overcome this limitation for this visual.
How it happens:
I created a Gantt chart 2.2.3 visual in desktop, adding the following fields to its tooltips:
We can see that we can only place a maximum of three fields in the tooltip, so why can only three fields be placed in the tooltip of the Gantt chart 2.2.3 visual object, and is there a way to lift this restriction?
First for the Gantt 2.2.3 chart tooltip, I looked at the design code for the Gantt 2.2.3 custom visual object and I found that when he originally designed it, the maximum limit was 3. This is the cause of the limitation.
How to overcome it:
Based on the limit we found in above section, I have two solutions to overcome it.
Solution1:
First, we can directly change the number limit in the custom visual object's capabilities.json file and subsequently repackage it as a .pbiviz file. The steps are as follows:
GitHub - microsoft/powerbi-visuals-gantt: upon data values.
The final result of our modified Gantt chart 2.2.3 into desktop is shown below:
Solution2:
The second method you can also try is to create calculated columns, merge the columns you want to put in the tooltip and display them together:
Column 2 = 'Table'[date]&" - "&'Table'[date1]&" - "&'Table'[Column]
The final result is as follows:
Summary:
Gantt Chart 2.2.3 is a very useful visual object, but there is a limit to the number of tooltips, if you want unlimited or more fields available, you can customize the generation of the visual object by following this link. However, there are some possible effects of modifying a custom visual, such as slow loading, poor performance or even failures, etc. And issues caused by customizing a custom visual will become out of Microsoft support. I hope that you will take these into account if you want to modify the code of an open-sourced visual.
Develop custom visuals in Power BI - Power BI | Microsoft Learn
Author: Xianda Tang
Reviewer: Ula and Kerry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.