Show or hide value labels on a specific series

Knowledge Drop

Last tested: Mar 31, 2021

There isn’t a native option in the visualization edit panel to toggle value labels on/off for individual series, but please leave feedback for the Looker product team! After authenticating into the feedback portal, you can click here for the open request!
Two other options you can use below:

Solution 1

You can use the "Value Colors" input field to manipulate the coloring of each series by entering color codes or names and comma separating to target series in the order they appear from left to right. If you define the color as "transparent" it will hide the value label for the series! Caveat: "transparent" is only transparent to the underlying graphic, it overlaps with other value labels as "white." If you have overlapping value labels, make sure the series you want with "transparent" value labels is listed last.

44e40732-53ae-466f-9d36-6ec801b56e06

Solution 2

Another workaround we can implement is to use the Excel-style formatting in the value format section. For example, if we write

#.00%[>0.05];[<0.05]

This will show the label if its above >0.05 and hide if below 0.05.

Two websites where you can test Excel style formatting are

But Wait, There's More!

If we are trying to show only certain points in a line on a bar chart, we can do some hacky things - like setting the default value of null to a value beneath the base y-axis value (-1, for instance, for the default y-axis). This can remove null value points that we can't otherwise get rid of by using the YesNo/Hide No's from Vis trick, since that hides the entire row where a value is null.

This content is subject to limited support.                

Comments
sergio_pestanaW
Participant I

Thank you for this tip!

So, i’ve tried here and it’s working for me. I can change colors, but I can’t select the specific series for that. I have 2, one in columns and other in lines. I wanted to show only the labels in the lines.

sam8
Staff

Hi @sergio_pestanaW ! 

I think we can use “Solution 1” for this. In my example, I have a column and a line. To only show values for the line, I enter the “Value Colors” as “blue, transparent”. Since my column is the second series, this makes the value labels on the column invisible, while keeping the value labels on for the line. 
 

ba10cd88-616f-4d58-86d8-78078c3db040.png

Does this work for you?

sergio_pestanaW
Participant I

It worked! 😄 I didn’t put the commas 

Dawid
Participant V

Just a note. Using transparent will not fix the overlap between the labels. Like in this example:

26d7f875-bdf3-4eba-a46a-be7437b5c952.png

Since the gold line chart’s labels are transparent, they’re still technically there and used for calculating whether the other labels can be shown because there’s no way to select priority.

Annon12
Observer

Solution 1 worked for me! But I would definitely be interested in seeing this added as a native feature.

I tried to use the hyperlink in the original post but I don’t have a pendo account to officially request the feature.

Avital
New Member

The way I select specific series to hide/show using Solution #2:

Using ‘Values’ --> ‘Value Format’ field to set a specific show/hide logic for each series, separated by commas.
So if I have 3 series and I want to hide just the 2nd series label, I'll use:
General , General[<0.00], General
(replace [<0.00] with whatever rule applies to hiding this specific series)

The downside is that the comma separation will prevent you from using any format that contains commas, e.g. #,##0

LucianaPadua
Participant II

The way I select specific series to hide/show using Solution #2:

Using ‘Values’ --> ‘Value Format’ field to set a specific show/hide logic for each series, separated by commas.
So if I have 3 series and I want to hide just the 2nd series label, I'll use:
General , General[<0.00], General
(replace [<0.00] with whatever rule applies to hiding this specific series)

The downside is that the comma separation will prevent you from using any format that contains commas, e.g. #,##0

I tried using this solution but it didn’t work. The commas were taken as part of the value format. 

Avital
New Member

yes, I mentioned this downside: “The downside is that the comma separation will prevent you from using any format that contains commas, e.g. #,##0”.
You can use it with “General” format or any other comma-less format

Version history
Last update:
‎04-05-2021 03:15 PM
Updated by: