Jump to content
  • Create Scrolling Legend with Unlimited Items


     

    Background

    Spotfire limits chart legends to 29 items, however, a user may want more items to be shown. A simple solution is using a Treemap Visualization as a legend, though that may become crowded. Another (more advanced) solution is to use a Cross Table to create a scrolling legend, as shown here.

    Step-by-step

    1) Create Cross Table and set Horizontal Axes to "(None", set Vertical Axes to [Your Column], and use the First() aggregation to set Cell Values to "First([Your Column)]". Also change the Display Name of Cell Values to a desirable name in the aggregation's window:

    2) Create a Color By grouping for your column, set the Color Mode to "Unique values", and align the color scheme with your reference chart:

    3) In the Title Bar, go to Controls visibility and uncheck "Axis Selectors"

    axis_selectors.png.0842f425bbd88bd1dd17ecee86e84502.png

    4) Unselect "Use separate color for marked items", reduce the first column size, and update the Cross Table title to finalize the formatting of your legend:

    5) To completely hide the first column use run this IronPython script once, with 'vis' set to your Cross Table:

    # Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license.
    
    # 'vis' is a script parameter
    
    # Import Modules
    from Spotfire.Dxp.Application.Visuals import *
    
    # Set row header column width to 0 (i.e. first column)
    vis.As[CrossTablePlot]().RowHeaderWidths.Item[0]=0
     

     


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...