Business Intelligence Tools

Spotfire Troubleshooting — Labels won’t appear on a map chart feature layer

  • Are you having issues getting labels to appear on a feature layer in a map chart?

I ran into an interesting problem this week.  A user was working with a very detailed map chart.  It had at least 10 layers split up between marker layers and feature layers.  The user wanted to put labels on one of the feature layers that represented well paths (aka well sticks), but they wouldn’t show up.  I ran several tests trying to figure out the problem.  I put labels on other feature layers.  I created new, simpler maps with just this one layer.  I compared the settings with other feature layers that had labels.

As is quite often the case, the answer was in the data.  The table (an information link) behind the feature layer didn’t have X and Y coordinate columns, and labels need the coordinates to know where to place the labels.  The sticks were placed correctly on the map without the x and y  coordinates, but the labels require them.  I needed to add  XCenter, XMax, XMin, YCenter, YMax and YMin columns to make the labels work. The moral of the story — Always check your data!

Update on 8/30/2017 — I ran into this problem again and came back to my post for help in solving it.  In re-reading the post, I realized more detail and information were needed to show how I solved the problem.

The post says — I needed to add  XCenter, XMax, XMin, YCenter, YMax and YMin columns to make the labels work. Well, how did I do that?

Answer — I used all six of the WKBEnvelope spatial functions

More specifically, I applied those functions to the SHAPE column in my information link.  Those functions generate the XCenter, XMax, XMin, YCenter, YMax and YMin columns required for the labels. The exact expression was — WKBEnvelopeXCenter([SHAPE]).

 

 

6 thoughts on “Spotfire Troubleshooting — Labels won’t appear on a map chart feature layer

  1. Pingback: Creating Information Links with Spatial Data - Data Shop Talk

  2. Jeremy Reply

    In Spotfire 7.6.1.26 I don’t see a Spatial Functions category at all when trying to create these new calculated columns. Do you know where they’ve gone by chance?

    • Julie Sebby Post authorReply

      I was using version 7.9 at the time. If they exist in version 7.6, they will be under the spatial category of functions. I can’t add a screenshot to comments, but if you go to Insert > Calculated column…look on the right-hand side of the dialog and there will be a drop down for the category. In that drop down there should be an option for spatial, and they will be in there. If you don’t have spatial, they probably weren’t added until 7.9.

Leave a Reply

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