Table Of Contents

Automatically Displaying Properties on a Dashboard Tile

Last Modified: August 31, 2020

Add properties, or key-value pairs, to a tag or notebook (.ipynb) to automatically populate them on a dashboard tile when you add the data source to a tile.

Adding Properties to a Tag

Manually add properties to a tag so they display on a tile containing the tag.

  1. In Tag Viewer, double-click the tag you want to use as a data source for the dashboard tile.
  2. Click Add Property and define the property you want to automatically populate on the tile when you add the tag as a data source. Refer to the following table to determine which properties you want to add.
    Property on the tile Description Key Example value
    Title Name you want the tile to display displayName Failed tests
    Units Unit of measurement, quantity, or classification of the data units
    • Tests
    • km/s
    Navigation Link to data source in NI SystemLink Web Application hyperlink #tagviewer/tag/d725064a-b04a/f00.bar
    spd-note-note
    Note  

    These are the only properties you can define to automatically display on a tile for a tag.

  3. Repeat step 2 to add more properties.
  4. Click Save.

Adding Properties to a Notebook

Manually add properties to a notebook (.ipynb) so they display on a tile containing the notebook.

  1. In Jupyter, double-click the notebook you want to use as a data source for a dashboard tile.
  2. Define the properties in a code cell of the notebook. Refer to the following table to determine how you want to define the style of your tile.
    Property on the tile Description Property type Key Example value
    • X Label
    • Y Label
    Name for the X and Y axes on a graph tile Global axis_labels ['x index', 'Day']
    Tick label Name for a data point on the graph Global tick_labels [{'x': 0, 'label': 'January'}, {'x': 1, 'label': 'February'}]
    Orientation Layout of the tile Global orientation VERTICAL
    Plot colors Colors you want to add to differentiate data plots on the graph Plot plot_color
    • CSS color name (e.g. blue)
    • Hex string (e.g. #0000ff)
    • RGB string (e.g. rgb(0,0,255))
    Plot style Type of graph you want to use to display the data Plot plot_style
    • LINE
    • BAR
    • POINT
    • SCATTER
    For example, your code cell may look like the following:
    # Result
    sb.glue('navigation', '#testmonitor/testresults/config/...')
    sb.glue('title', 'Image')
    sb.glue('axis_labels', ['x index', 'Value'])
    sb.glue('tick_labels', ticks)
    sb.glue('orientation', 'VERTICAL')
    sb.glue('result', result)
    spd-note-note
    Note  

    The result in sb.glue('result', result) is an array of objects. For example, your code cell may look like the following:

    {
       plot_style: "BAR",
       plot_color: "rbg(0,0,255)"
       data_format: "XY",
       data_frame: {,…}}
    }
    
  3. Click Save.
When you add the tag or notebook to a tile in Dashboards, the properties you added automatically display on the tile. Refer to Visualizing Data on a Tile Dashboard for more information.

Recently Viewed Topics