Skip to main content

Creating Legends

· 2 min read
James Dales
Co-founder of Tekantis

Whilst we have it on our backlog, Icon Map Pro doesn't yet have the ability to draw a legend. It's actually really complicated to create a legend that works for all of the different types of maps that you can create with the visual. Separating out the different formatting options should help with this, but it's still not an easy job.

The good news is, in the meantime, we can use Power BI's built in visuals to create really effective, interactive legends.

My favorite technique is to use Power BI's new slicer visual. The one with the lighting bolt:

Lightning Bolt Slicer

As the new slicer visual supports conditional formatting, we can apply the same color rules to the slicer as we can the shapes on the map.

In this case I'm using the accent bar within the button to show a square of color. I've increased the width of the bar and then set the color using using conditional formatting.

Accent bar

I've also set the padding so that the text appears further to the right to allow for the wider accent bar.

Padding

Other things to remember:

Turn on "Maintain layer order" on both the legend and map visual. This way the legend will always appear on top of the map once you've published it to the Power BI service.

Maintain layer order

And also turn off the header icons on the legend visual.

Header Icons

Download the example report to see how it's done.