Hide elements inside a SpotfireControl

Let’s say you want to remove an item from the dropdown of a SpotfireControl.

You can look inside of a Spotfire Control with the following JavaScript:

HTML:

<p id="turkey"><SpotfireControl id="b6d7d7d9761649bd9f87f096def91dfb" ></p>

<p id="bacon"></p>

JS:

$( document ).ready(function() {
   $('#bacon').text($('#turkey').html());
});

This lets you see the inside of the SpotfireControl. We see that the ‘Variable’ selection is the one that we want to hide. Simply grab the object using the title attribute.

JS:

$( document ).ready(function() {
   $("[title='Variable']").hide();
});

Viola!

Changing the Colors of Spotfire Controls

In Spotfire 7.0 you should be able to change the colors of links easily.

Coloring Action Controls

To create a custom colored link, perform the following:

  1. Create an action control and set the control type to “Link“.

  2. Enter into “Edit HTML” mode, highlight the newly created action control and press Format.

  3. Change the color of the link.

Coloring Spotfire Calculated Values

For Spotfire Controls, this is trickier. To change the color of Spotfire Labels you have to spoof it by making rules.

  1. Create a new calculated value.

  2. You’ll notice that from the editor you can’t control color, only font type, size, and font decorations.

  3. Go back into the Calculated Value Settings. Since you can’t change the formatting of the calculated value from the editor, you’ll need to make a rule.

  4. Presto! Happy editing.

Better Architecture with Joined Data Tables

Recently we had a client that was having trouble with their tables freezing. They had a SQL database joined directly to an Excel sheet but found that the table would not update and was embedded. These frozen tables can be avoided with proper architecture. It’s best to have sources that are separate and then joined later. You can use the ‘From Current Analysis’ data source option to make a reference to these tables.

Where’s Waldo? – Using Logical and Text Functions to Find “_W”

When you’re performing column matching and the primary key of one table does not exactly match the similar column in the second table, data manipulation may be necessary. Using calculated columns, you could create the necessary values for column matching. This example demonstrates how to use a custom expression to extract a string of characters from a column when the number of character values may not be consistent.

Read More