Using the Repeat Expression Function to Create Horizontal Bars


We do not have a visualization which allows horizontal bars, however, you can create an expression which would create a pseudo horizontal bar in a Table based plot.  This is possible using the Repeat function available in TIBCO Spotfire version 3.1 for constructing an expression.

Let's assume we have the following data loaded in Spotfire:

 

We can then create a calculated column using the following expression:
 

    Repeat(''',integer(10*[Col A]/Range([Col A])))

The Repeat function allows you to repeat a string a specified amount of times.  For the string, we use the ASCII delete character, '.  To specify the number of times to repeat, you can use any calculation as long as it outputs an integer.

In this example, we divide the value from Col A by the Range of Col A, then multiply by 10 and finally cast to an integer.

The result?