Business Intelligence Tools

“Whiting Out” a Visualization Label in Spotfire

When using Spotfire, do you ever place a variable on an axis to make the visualization look a certain way, only to see its label show up unwanted next to the other necessary labels?

I’ve had this happen when manipulating dates or forcing a visualization (scatter plot, waterfall chart, bar chart) to be in a certain rank order.  Recently, I wrote a post on how to rank and order a gantt chart, which faced this issue.  I discussed how to remedy the issue in that article, but here I want to highlight the method used since we can use it in many other scenarios.

In this post, we will discuss how to white out a label on an axis.

In the previous post, I re-ordered a scatter plot to create a gantt chart by creating a Date Rank column and placing it on the y-axis before the y-axis value.  However, I was left with this:

The numbers from the Date Rank column show up next to the Asset Name, in effect displaying superfluous and, even worse, confusing information.  The user doesn’t know what those numbers represent without further investigation.

I faced a similar issue creating a waterfall chart only weeks later, this time on the x-axis, making me realize how often this issue can occur.

Above, we see that I actually had two rank columns.  Note that the rank numbers did not even match up with the project numbers, making the labels even more confusing.   I want to avoid this confusion by hiding these rank columns while keeping the necessary project names.  I want my Spotfire ranking trick to remain under the hood.

Unfortunately, Spotfire won’t let you keep a label on one axis but not another. What it will let you do is use an image as a label. So, if we find a all white image, we can insert that as our label, which will make the image appear the same as the background (if you are using the dark visual theme, you need to use a black image).  In effect, we are “whiting out” the unwanted label.

To do so, click on the white image below to go to its page, then copy the URL. Trust us, there’s an image there.

Now, go to the visualization Properties > Y-axis > Label Rendering.  If you want to white out something on the X-axis, choose that instead of the Y-axis (the axis must contain at least one categorical variable for rendering to be an option).

Choose the column which you want to white out from the Column window and Image from url in the Show as window,
then click Settings. Paste in the url.  You will now get something that looks like this:

Close, but not quite! I don’t like those tick marks to the left of Asset Name. Go to View > Visual Theme > Edit Custom Theme > Visualization scales. Select None for Tick marks.

And, there we have it! We have made the unwanted label invisible, and the user can only see the label that we want them to see.  Here we see the final result of the waterfall example:

Try it out, and let me know how it goes!

Leave a Reply

Your email address will not be published. Required fields are marked *