Tip of the Week

Conditionally displaying comments on a plot

There are times when you may want to conditionally label points on a graph.  For example, let’s say you have sales data, and a small percentage of these records have a comment.  You may want to display the comment as a label on a chart, and display no label for the records with no comments.

The first step to implement this is to create a calculated column which will output ‘yes’ if you have a comment for that row , otherwise ‘no’.  Assuming our comment column is called ‘Comments’, the expression is shown below:




Next, we should update our plot to show a label by the 'Comments' column and only show labels for marked records.

 



Once this is done, we now need to create two bookmarks: one with all the comment records marked and another with none marked.  

The easiest way to do this is to create a Cross Table which displays just the ‘Comment Flag’ column we created earlier on the vertical axis and ‘Row Count’ on the bottom axis.

 



Next, mark the ‘yes’ row in the Cross Table and then click the ‘Capture Bookmark’ icon in the toolbar and save the bookmark as ‘Show Comments’.  Then unmark all records and click ‘Capture Bookmark’ this time saving the bookmark as ‘Hide Comments’.

The last step is to open up a Text Area and add two Action Control buttons. The first is called ‘Show Comments’ and will include the Marking selection from the ‘Show Comments’ bookmark and the second is called ‘Hide Comments’ and will include the Marking selection from the ‘Hide Comments’ bookmark.

 


 

NOTE: The reason we create the calculated column and display the cross table is so that it is easier to mark all records with comments so we can bookmark it. You can always show the comments in a table chart as well and mark them that way, so that no calculated column has to be created.

You can then delete the Cross Table, and the finished product will have two buttons to show and hide the comments as labels on the given chart.

 

Comments

 

hvmarck said:

Wouldn't it be much simpler if you guys reimplemented labels so empty labels would not be shown (which is probably only like 2 lines of code more and would make labels useful at last)?

September 6, 2010 2:46 AM
 

evang said:

amen!

September 7, 2010 6:32 PM
 

ihaimowitz said:

the solution proposed is indeed brutal.

I would love it if comments could be shown as conditioned on another value, like sales or population size or some other meaningful magnitude.

September 9, 2010 10:28 PM
 

Fredrik said:

Please note that this behaviour has been changed as requested in TIBCO Spotfire 3.3 - labels are now not shown when the value is untagged/empty (and "Show empty labels" is unchecked).

May 16, 2011 2:05 AM
 

essay service said:

I can definitely use this for my future reference!

September 8, 2011 10:49 AM
 

oakle78 said:

I would love it if comments could be shown as conditioned on another value, like sales or population size or some other meaningful magnitude.

October 31, 2011 8:32 PM
 

North Face Jackets Clearance said:

perfect for directing the in the area trails or possibly the walk to type or employment.Providing very best ventilation without sacrificing .<a href="www.northsfaceclearance.com/"><strong>North Face Jackets Clearance</strong></a>comfort and / or support, a newly renovated osprey hiking provides atmos backpack contains your download closer to an individual's back so that you can log your miles for the first time

December 5, 2011 1:01 AM
 

North Face Jackets Clearance said:

This light in weight pack layout certainly isn't lightest you can get, but is among the most comfortable not to mention superbly <a href="www.northsfaceclearance.com/"><strong>North Face Jackets Clearance</strong></a>finely detailed. Built with gender specific BioStretch harness together with hip gear for a safe and sound fit as well as the

December 5, 2011 1:04 AM
 

uggkensington said:

December 27, 2011 3:58 AM
 

uggkensington said:

December 27, 2011 3:58 AM
 

uggkensington said:

If you want to buy<a href="www.uggkensingtons.org/">

December 27, 2011 3:59 AM
 

uggkensington said:

http://www.uggkensingtons.org/

http://www.uggkensingtons.org/ugg-fox-fur-short-boots-5531-c-54.html | UGG Fox Fur Short Boots 5531

http://www.uggkensingtons.org/ugg-kensington-boots-5678-c-2.html | UGG Kensington Boots 5678

http://www.uggkensingtons.org/ugg-rainier-eskimo-boots-5189-c-85.html | UGG Rainier Eskimo Boots 5189

http://www.uggkensingtons.org/ugg-retro-cargo-boots-1895-c-3.html | UGG Retro Cargo Boots 1895

December 27, 2011 7:53 PM
 

uggskensingtonsale said:

www.uggskensingtonsale.org

www.uggskensingtonsale.orgugg-adirondack-boots-ii-c-6.html | UGG Adirondack Boots II

www.uggskensingtonsale.orgugg-adirondack-tall-boots-c-11.html | UGG Adirondack Tall Boots

www.uggskensingtonsale.orgugg-amberlee-boots-c-34.html | UGG Amberlee Boots

www.uggskensingtonsale.orgugg-annabelle-boots-c-35.html | UGG Annabelle Boots

www.uggskensingtonsale.orgugg-bailey-button-boots-c-15.html | UGG Bailey Button Boots

December 28, 2011 3:33 AM
 

uggskensingtonsale said:

www.uggskensingtonsale.org

www.uggskensingtonsale.orgugg-adirondack-boots-ii-c-6.html | UGG Adirondack Boots II

www.uggskensingtonsale.orgugg-adirondack-tall-boots-c-11.html | UGG Adirondack Tall Boots

www.uggskensingtonsale.orgugg-amberlee-boots-c-34.html | UGG Amberlee Boots

www.uggskensingtonsale.orgugg-annabelle-boots-c-35.html |

December 28, 2011 3:34 AM
 

uggskensingtonsale said:

www.uggskensingtonsale.org

www.uggskensingtonsale.orgugg-adirondack-boots-ii-c-6.html | UGG Adirondack Boots II

www.uggskensingtonsale.orgugg-adirondack-tall-boots-c-11.html | UGG Adirondack Tall Boots

www.uggskensingtonsale.orgugg-amberlee-boots-c-34.html | UGG Amberlee Boots

www.uggskensingtonsale.orgugg-annabelle-boots-c-35.html |

December 28, 2011 3:38 AM
 

uggskensingtonsale said:

www.uggskensingtonsale.org

www.uggskensingtonsale.orgugg-adirondack-boots-ii-c-6.html | UGG Adirondack Boots II

www.uggskensingtonsale.orgugg-adirondack-tall-boots-c-11.html | UGG Adirondack Tall Boots

www.uggskensingtonsale.orgugg-amberlee-boots-c-34.html | UGG Amberlee Boots

www.uggskensingtonsale.orgugg-annabelle-boots-c-35.html |

December 28, 2011 3:39 AM
 

uggkensingtons said:

http://www.uggkensingtons.org/ |http://www.uggkensingtons.org/

http://www.uggkensingtons.org/ugg-kensington-boots-5678-black-p-13.html |UGG Kensington Boots 5678 Black

http://www.uggkensingtons.org/ugg-kensington-boots-5678-brown-p-42.html |UGG Kensington Boots 5678 Brown

January 3, 2012 10:25 PM
 

uggretrocargosale said:

January 4, 2012 1:01 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

Syndication

Other Spotfire Blogs

Spotfire's interactive information visualization and analytic solutions give users a remarkable experience for quickly and easily querying data and reporting results for superior business intelligence. From portfolio management and customer retention programs to key processes such as CRM, marketing, research, bioinformatics, yield and asset management and design for manufacturing, enterprises around the world rely on Spotfire's business analytics software to improve operational performance.

©Copyright 2000-2011 TIBCO Software Inc | Privacy Policy | Terms of Use I Blog I Contact Us I Content Center