Business Intelligence Tools

Spotfire – Label Hack

  • Have you ever wanted to include multiple labels, but run into limitations where Spotfire only allows you to add one?

This problem can be solved with a simple hack using a custom expression.  As you can see in the screenshot below, there isn’t an option to add more than one column of data to a label.  A simple fix for this is to right click and use Custom Expression.

Use the concatenate function to string together columns of data, and separate them with additional arguments.  In the example shown below, I am concatenating Operator, FieldName and Lease and separating them with dashes and spaces.

formula

The end result looks like this.
final-label

 

Updated 8/24/2017:

This hack works for scatter plots, 3D scatter plots and map charts.  It will work anytime you see the label by selector (shown in red below), which is where you right click and select ‘Custom Expression’.

You won’t see this in line charts, bar charts, and many other visualizations.

10 thoughts on “Spotfire – Label Hack

  1. Anna Smith Reply

    Another tip – if you just use & instead of concatenate, you can also insert a “\n” in between columns to make them space down a level. For example, writing [TWN] & [TWN_DIRECTION] & “\n” & [RNG] & [RNG_DIRECTION] will give a clean looking label on tonwship/range shapefile data!

    • Julie Schellberg of Big Mountain Analytics, LLC Post authorReply

      Thank you for that suggestion!

  2. Jen Loglia Reply

    Is this possible for line graphs, too? I am having trouble finding the “Custom expression” option in the Properties menu.

    Thank you!

    • Julie Schellberg of Big Mountain Analytics, LLC Post authorReply

      Not for line graphs.

    • Julie Schellberg of Big Mountain Analytics, LLC Post authorReply

      You can use this feature in scatter plots, 3D scatter plots and map charts. I’ll update the post. Basically, if there is a drop down selector that you can right click on and select custom expression, you can use this feature.

  3. David S Reply

    Can scripting be used to add labels? Especially for bar charts and line charts.

    • Julie Schellberg of Big Mountain Analytics, LLC Post authorReply

      You can show and hide labels with IronPython.

  4. Elizabeth Schuller Reply

    Is there a way to show the labels as a percent of total row count in a scatterplot using tiled markers? I have a simple 3×3 scatterplot and i can show the count in each tile, but I want to show it as a % of total instead. I can see how to do it using a % of eithe tthe x or y axis, but I want to show it as a % of total.

Leave a Reply

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