Jump to content
  • How to define Custom Name for Axis Selectors Expression in Spotfire® Using IronPython Scripting


    This article provides a sample script reference using which you can define a custom expression name for the Axis Selectors in a visualization

    Introduction

    This article provides a sample script reference using which you can define a custom expression name for the Axis Selectors in a visualization

    For this script create two script parameters where the value is defined based on expression, for example as below

    converted-file.png.b4f5d8e40c5167b7fff95e61d5cb44df.png

     

    Code Sample

     # Copyright © 2019. TIBCO Software Inc. Licensed under TIBCO BSD-style license.
     
     from Spotfire.Dxp.Application.Visuals import *
     
     #Define a script parameter 'chart' referring to the visualization
     vis=chart.As[barChart]()
     
     #set the axis expression with custom names
     vis.YAxis.Expression= "count() as ["+exp1+"], Sum([Population]) as ["+exp2+"]"
     

    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...