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

Join 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.

Reply
carlymay
New Member

Add labels to custom shape map

I have a custom shape map in Power BI which I generate using a TopoJSON file. Below is a snippet of the code and also what the resulting shape map looks like. As can be seen, the map is not geographical but more so a graphical representation of work departments.

 

"type": "Topology",
    "arcs": [
        [[-61.25,1000],[700,0],[0,-70],[-700.5,0],[0,70]],
        [[658.75,1000],[700,0],[0,-70],[-700.5,0],[0,70]],
        [[1378.75,1000],[700.5,0],[0,-70],[-700.5,0],[0,70]],
        [[2098.75,1000],[700.5,0],[0,-70],[-700.5,0],[0,70]],

        [[-61.25,700],[400,0],[0,-70],[-400,0],[0,70]],
        [[960.0,700],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[1378.75,700],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[1980.0,700],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[2400.0,700],[400.0,0],[0,-70],[-400.0,0],[0,70]],

        [[-61.25,610],[400,0],[0,-70],[-400,0],[0,70]],
        [[960.0,610],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[1378.75,610],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[1980.0,610],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[2400.0,610],[400.0,0],[0,-70],[-400.0,0],[0,70]],

        [[-61.25,520],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[960.0,520],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[1378.75,520],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[1980.0,520],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[2400.0,520],[400.0,0],[0,-70],[-400.0,0],[0,70]],

        [[960.0,430],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[1378.75,430],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[1980.0,430],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[2400.0,430],[400.0,0],[0,-70],[-400.0,0],[0,70]],

        [[1980.0,340],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[2400.0,340],[400.0,0],[0,-70],[-400.0,0],[0,70]],

        [[1980.0,250],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[2400.0,250],[400.0,0],[0,-70],[-400.0,0],[0,70]],

        [[1980.0,160],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[2400.0,160],[400.0,0],[0,-70],[-400.0,0],[0,70]],

        [[1980.0,70],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[2400.0,70],[400.0,0],[0,-70],[-400.0,0],[0,70]],

        [[720.0,-80],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[1140.0,-80],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[1560.0,-80],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[1980.0,-80],[400.0,0],[0,-70],[-400.0,0],[0,70]],
        [[2400.0,-80],[400.0,0],[0,-70],[-400.0,0],[0,70]],

        [[370.0,-175],[330.0,0],[0,-70],[-330.0,0],[0,70]],
        [[720.0,-175],[330.0,0],[0,-70],[-330.0,0],[0,70]],
        [[1070.0,-175],[330.0,0],[0,-70],[-330.0,0],[0,70]],
        [[1420.0,-175],[330.0,0],[0,-70],[-330.0,0],[0,70]],
        [[1770.0,-175],[330.0,0],[0,-70],[-330.0,0],[0,70]],
        [[2120.0,-175],[330.0,0],[0,-70],[-330.0,0],[0,70]],
        [[2470.0,-175],[330.0,0],[0,-70],[-330.0,0],[0,70]]
    ],
    "transform": {
        "scale": [0.000001, 0.000001],
        "translate": [0, 0]
    },
    "objects": {
        "NameHere": {
            "type": "GeometryCollection",
            "geometries": [
                {
                    "arcs": [[0]],
                    "type": "Polygon",
                    "properties": {"id": "Department 1"}
                },
                {
                    "arcs": [[1]],
                    "type": "Polygon",
                    "properties": {"id": "Department 2"}
                },
                {
                    "arcs": [[2]],
                    "type": "Polygon",
                    "properties": {"id": "Department 3"}
                },
...

 

carlymay_0-1750812444301.png

 

Clicking the regions produces some filtering of a data matrix in Power BI. However, I need to add labels to each of the regions/boxes to show what they filter. If I add a text box over the top, I am no longer able to click the regions and filter. I think the solution is to add labels within the Topojson file but I can't figure out how to do this while ensuring the labels appear in a custom shape map in Power BI. Any help for how to display labels on top of each of these boxes would be much appreciated.

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @carlymay  - Power BI Shape Map visuals unfortunately do not natively support labels directly on the map. (ustom TopoJSON use and limitations) . 

 

You can try with Deneb or even a regular chart with hidden markers to overlay the text.

GitHub - deneb-viz/deneb: Deneb is a custom visual for Microsoft Power BI, which allows developers t...

 

Deneb: Declarative Visualization in Power BI | Deneb

 

Hope the above details helps.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
v-ssriganesh
Community Support
Community Support

Hello @carlymay ,
Thank you for reaching out to the Microsoft Fabric Community and thanks to @rajendraongole1 for sharing the helpful workaround suggestion using Deneb.

As mentioned, currently Power BI Shape Map visuals do not support native labels directly on custom TopoJSON regions. While workarounds like Deneb custom visuals is useful alternative, we completely understand the value of having direct labels within the shape map itself especially for use cases like yours involving department layouts.

We recommend that you submit this feature request to the Ideas forum: Fabric Ideas - Microsoft Fabric Community, If the idea receives enough community support through votes, the Microsoft product team may consider it for future releases.


If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

rajendraongole1
Super User
Super User

Hi @carlymay  - Power BI Shape Map visuals unfortunately do not natively support labels directly on the map. (ustom TopoJSON use and limitations) . 

 

You can try with Deneb or even a regular chart with hidden markers to overlay the text.

GitHub - deneb-viz/deneb: Deneb is a custom visual for Microsoft Power BI, which allows developers t...

 

Deneb: Declarative Visualization in Power BI | Deneb

 

Hope the above details helps.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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