Jump to content
  • How to label only the marked data in Spotfire® Using IronPython Scripting


    This article shows how to label only the selected data using IronPython

    Introduction

    This article explains how we can label only the marked data. For example, if I have five bars in my bar chart and if I click on the first bar, then only that bar will be labeled. Refer to the following screenshot.

    converted-file.thumb.png.75d98b49b4828d931d0a69d9f24836bb.png

     

    Code Sample

     # Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license.
     
     from Spotfire.Dxp.Application.Visuals import BarChart, LabelVisibility
     
     # setMarkedField is the document property which will hold the boolean value
     if setMarkedField == True:
         vis.As[barChart]().LabelVisibility = LabelVisibility.Marked  # This will label only the marked data
     else:
         vis.As[barChart]().LabelVisibility = LabelVisibility.All     # If setMarkedField  is false, then it will label all the data.
     

    References

    License:  TIBCO BSD-Style License

    Back to IronPython Scripting in Spotfire Examples:  https://community.spotfire.com/s/article/IronPython-Scripting-in-Spotfire

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...