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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to add Custom Visual Tooltip and Drill through in Custom Visual Table

Hi,

 

Developed custom visual table in power bi using visual studio code. In this not able to add tool tip and drill through functionality for table. In this my requirement is - based on selection of specific table row need to show tooltip and perform drill through functionality.

 

Referred Add tooltips to Power BI custom visuals - Power BI | Microsoft Docs

Power BI visual data point selections - Power BI | Microsoft Docs

But not able to get the functionality. Added the npm references - 'powerbi-visuals-utils-tooltiputils','powerbi-visuals-utils-dataviewutils' in code

Some declaration may be missing i believe. It would be helpful if there were a list of steps needed for the implementation. How can we display a tooltip and drill through the table row values

Abi_RP_1-1657521060070.png

{
"dataRoles": [{
"name": "Country",
"kind": "Grouping",
"displayName": "Country"
}, {
"name": "State",
"kind": "Measure",
"displayName": "State"
}],
"objects": {},
"dataViewMappings": [{
"table": {
"rows": {
"select": [{
"for": {
"in": "Country"
}
},
{
"for": {
"in": "State"
}
}
]
}
},
"conditions": [{
"Country": {
"max": 1
},
"State": {
"max": 1
}
}],
"categorical": {
"categories": {
"for": {
"in": "Country"
}
},
"values": {
"select": [{
"bind": {
"to": "State"
}
}]
}
}
}],
"tooltips": {
"supportedTypes": {
"default": true,
"canvas": true
},
"roles": [
"Country"
],
"supportEnhancedTooltips": true
},
"supportsLandingPage": false,
"drilldown": {
"roles": [
"Country"
]
}
}

 

Thanks

 

1 ACCEPTED SOLUTION

Hi @Anonymous 

Thanks for your reply.

You can try the example in this article,

vxiaotang_0-1658935574409.png

GitHub - microsoft/PowerBI-visuals-sampleBarChart: Bar Chart Custom Visual for tutorial.

vxiaotang_0-1659070513394.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Thanks for reaching out to us.

Is this what you are looking for?

Add tooltips to Power BI custom visuals - Power BI | Microsoft Docs

vxiaotang_0-1657778853892.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Yes. I need the code sample functionality in the table design during selection of first column (i.e Column-'Country' as stated in example screenshot) rows we need to show the tool tip & drill through.

Hi @Anonymous 

Thanks for your reply.

You can try the example in this article,

vxiaotang_0-1658935574409.png

GitHub - microsoft/PowerBI-visuals-sampleBarChart: Bar Chart Custom Visual for tutorial.

vxiaotang_0-1659070513394.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Hi,

I am trying to add drill through option in custom visual. Currently the tooltip is shown to me, but not the drill trought, it allow me a drill down but not drill trought. I have downloaded the sample bar chart that is in the guide and I can't see the drill throught option either.  On the other hand, if I put a Power BI default chart, the option appears there.

I have seen another post updated in 2023 this:

 

CristinaD_0-1678196283242.png

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-visual-tooltips?tabs=desktop-new

 

Does it mean that the option is no longer available from a custom visual?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.