Mark effects like borders and halos (for maps) have limitations including: (1) they are all or nothing and (2) disappear below 90% opacity, respectively. This trick shows you how to get around those limitations for perfect borders every time!
Hi. This is Ryan with Playfair Data TV. And in this video, I’m going to provide a formatting trick to help you make more engaging scatter plots and symbol maps.
We’ll start with the scatter plot. I’m just going to double-click on Sales and double-click on Profit. I will also change the mark type from Shape to Circle, make that circle a little bit larger so that we can see it and maybe change the level of detail to Region by just putting the Region dimension onto the Detail Marks Card.
Now let’s say that we are using this scatter plot on a dashboard that contains other visualizations that are also colored by the Region dimension. So if we wanted to make associations– so color associations– between those regions in those different views, we would need to add the Region dimension to the Color Marks Card.
OK. So far so good. One of the formatting things I like to do on a scatter plot, though, is add a border. Let’s see what our options are, here, for a scatter plot.
I’m going to go to the Color Marks Card. And under Effects, there is an option for Border. But watch what happens when I click on the options. They are all or nothing.
So I could give these a color, such as black, just so that they pop a little bit more on the view. And that’s helpful. But another thing I like to do is make the interior of those circles a little bit transparent, which is particularly effective if you’ve got lots of different marks on the view. So if you’ve got any overlap, adding some transparency helps reveal underlying marks.
So I might drag this down to, say, 50%, which will give those circles a lighter look. But now we’re kind of losing the color. And I’m not in love with those all-or-nothing borders.
Well, that’s what I’m going to show you how to do. It’s another trick that leverages the dual axis. We have another video, here, that explains some creative ways on how to use a dual axis. This is yet another one.
What I’m going to do is duplicate either the Profit measure or the Sales measure on the Columns Shelf or Rows Shelf, respectively– doesn’t matter which one you do. I’ll just duplicate the Sales pill on the Rows Shelf by holding down the Control key while I click on it and drag it right next to itself.
So now we’ve got the same chart on two rows. But what’s important about this is now that I’ve got two measures on the Rows Shelf, they each get their own set of Marks Cards. And those Marks Cards can be edited independently of each other.
So on the first row, I can get rid of the border on the Color Marks Card. So I’ll switch that to None. I’ll leave the transparency at 50%. I had it at 51%. Just to be precise, I’ll change that to 50%.
But then on the second row, I will change the Mark type from Circle back to Shape and click the Shape Marks Card to ensure that it is set to Circle. And maybe you can start to see this come together now.
But I’m going to change the Opacity back to 100% for the second row, only. So first row scatter plot, Circle is my mark type. The second row, same exact scatter plot. So those marks are in the exact same position. But the mark type is Circle– I’m sorry– is the open circle instead of that closed circle. So now if I combine these and synchronize the axes, we’ll have the open circle at full opaqueness surrounding those circles at 50% opaqueness.
To convert this to a dual-axis chart, just click on the second pill and click Dual Axis. It looks like they’re already synced up. But just to be sure, I’ll right click on one of the axes and choose Synchronize Axis just to make sure. And I’ll go to the All Marks (Shelf) to make all these circles a little bit bigger just so that we can take a closer look.
But notice, now, we’ve got two different marks laying on top of each other. And the trick was, we were able to color the border the same thing as the underlying circles below it– gives it a nice little polished effect.
And because scatter plots are technically used to make maps, you can use this exact same formatting trick to help make your symbol maps more engaging. Let me show you what I mean by that.
On a new sheet, I’m just going to double-click on the State dimension, which will create the first type of map. This is called a Symbol Map. I’ll make these circles on each state a little bit bigger and color these circles by the Region dimension as well.
And if I go to the Color Marks Card, I see there’s a border effect– same thing that we saw on a scatter plot. But it’s all or nothing. We also see something called a Halo effect.
This is a little bit different than Border. Let me show you if I choose a black halo. For marks that are overlapping, it doesn’t draw the border around each individual circle, it draws the border, or what they call a halo, around the entire overlapping group.
Here’s a good example where you’ve got three states that are kind of bunched together. And the halo effect goes all the way around.
But a couple drawbacks to this. First, just like with borders, this is an all-or-nothing effect. Two, with halos, they actually go away once you get down to less than 90% opacity. So if I change this to 89%, those halos just go away altogether. If this is 90% and above, we see that halo.
But the point in the formatting trick of this video is I’m going to show you how to make better borders that match the color of those marks. Same thing as with my scatter plot. First, I’m going to turn off all the Border and Halo effects.
I’m going to duplicate the Latitude pill on the Rows Shelf by holding down the Control key and dragging it right next to itself. At this point, we have two maps. But because we have two measures on the Rows Shelf, they each get their own Marks Cards that can be edited independently of each other.
So for the first row, I can change the opacity down to 50%. On the second row, I can change the mark type from that closed circle to an open circle, bring the opacity all the way back up to 100%, make this a dual-axis map by clicking on the second pill on the Rows Shelf and choosing Dual Axis.
And now we have a nice little clever formatting trick on a symbol map.
This has been Ryan with Playfair Data TV – thanks for watching!