Locked lesson.
About this lesson
In this lesson, you'll learn how to add Labels to your Visualizations.
Exercise files
Download this lesson’s related exercise files.
13 - Adding Labels To Your Visualizations.docx60.3 KB 13 - Adding Labels To Your Visualizations SOLUTION.docx
55.6 KB
Quick reference
Adding Labels To Your Visualizations
In this lesson, you'll learn how to add Labels to your Visualizations.
When to use
Any time you want to add labels to your vizualization, you'll use this.
Instructions
Hold down the "Control" button on your keyboard (on Mac, it's the "Command" button), then click on the dimension you'd like to make a label out of. Drag the dimension to the "Label" tile in the "Marks" Card, and drop it.
Hints & tips
- You can use any dimension to add a label to your vizualization
- Hold the control button, then drag the dimension pill to the Label tile in the Marks Card.
- 00:04 Okay in this video, I want to show you how to add labels to your charts.
- 00:07 So let's create a pie chart real quick, click on this, and
- 00:11 let me resize this real quick.
- 00:13 There we go there and let's resize there, so this is great.
- 00:17 It's a nice little pie chart but, unless we hover over each thing,
- 00:19 we don't really know what's going on here.
- 00:21 So, let's say we want to add labels, let's say we want to add the actual breed as
- 00:25 labels for each of the little slices in the pie chart, so how do we do that?
- 00:29 Well, notice over here in our marks card, and we going to talk about the marks
- 00:32 card in greater detail going forward, but you could see there's some boxes here,
- 00:36 color, size, label, angle, tooltip, and detail.
- 00:38 So each of these allow us to make customizations to our visualization.
- 00:44 So, what we can do is just grab one of these things and drag it to whichever one
- 00:48 of these boxes we want to mess around with, in this case label.
- 00:51 Now we don't want to just grab this and drag it and drop it because if we did,
- 00:54 that's moving it.
- 00:55 And we don't want to move it, we don't want to move the pill,
- 00:59 we want to sort of make a copy of it and drag that copy in because we want
- 01:03 the breed to stay on there, we just want to also add the breed as a label.
- 01:07 So to do that we hold down the control button on our keyboard while we're
- 01:10 dragging and dropping.
- 01:11 If you're on a Mac computer, I think it's the command button,
- 01:14 not the control button because Macs don't have control buttons.
- 01:17 But go ahead and if you're on Windows, click and hold the control button down,
- 01:21 you can't tell but I'm doing it right now.
- 01:23 And then, click your mouse button,
- 01:25 hold the mouse button down to select the thing that you want to drag.
- 01:29 And then let's just drag this over and you'll notice when I hover over the label,
- 01:33 the little box turns dark, that's what you want to see.
- 01:37 So make sure you see that dark color pop up, and then just let go your button, and
- 01:41 when you do boom, your labels pop up.
- 01:43 Now we've got like I don't know a couple thousand different dog breeds so
- 01:49 it's just grabbing the biggest ones, and it's still not all that useful.
- 01:54 This one says mixed, but if you had less data if you had less slices which we'll
- 01:58 show you how to filter that probably in the next couple of videos,
- 02:02 then this will help a lot and these labels will become super useful.
- 02:06 So that's how you do that very easy, if we also wanted the count,
- 02:10 we could do the same thing, grab, hold down the control button or
- 02:15 command if you're on a Mac, drag this up here and boom.
- 02:18 Now the count for each of these on there, so that's kind of cool.
- 02:21 Let me just go ahead and undo that, and undo that as well, so
- 02:24 let's play around with this.
- 02:26 Let's head over to our, for instance, the tree map,
- 02:29 now this is a cool one, it already has, the dog breeds, right?
- 02:33 It's already got the label, but maybe we want to count for each one so,
- 02:37 I'm going to hold down my control button, grab this, bring it up to labels and boom,
- 02:41 now we have counts.
- 02:42 Now this is super useful, right?
- 02:44 Because we could see, without having to hover, over each box, what the count is.
- 02:49 And you see down here it stops doing it because the boxes become so
- 02:52 small, it just can't fit all that stuff in there.
- 02:55 But for the bigger ones you could see at a glance are pitbull terriers,
- 03:00 2,500, Chihuahuas, 2,500 and change.
- 03:04 Mixed is the biggest one labs, next lab mix, after that, German shepherd,
- 03:08 golden retrievers, yorkshire terriers 1,990.
- 03:12 Very cool, so just that easy to add labels to your visualizations.
- 03:15 Remember, hold down the control key when you're doing this otherwise this can get
- 03:20 messed up.
- 03:21 So if I undo this and now let's say I grab this and
- 03:24 bring it over here, you can see it's all messed up now.
- 03:27 So that's what happens when you don't hold the control key down.
- 03:31 So just remember, hold the control key command if you're on a Mac,
- 03:34 make sure it's hovered over this.
- 03:36 Now these are all crammed together so you really have to pay attention when you're
- 03:39 hovering over one that it highlights.
- 03:41 And you can see a highlighting by turning dark when you're mostly over it, and
- 03:46 just let off your mouse button, boom, it pops right on there, and very cool.
- 03:50 So that's labels, and you could see we're using the count here for
- 03:54 the label, which makes sense in this situation.
- 03:56 We might want to know instead, the percentage instead of just the count,
- 04:00 we'll look at how to do that in the next video.
Lesson notes are only available for subscribers.