Jump to content
  • How to change the Appearance of a visualization in Spotfire® using IronPython Scripting


    This sample articles demomstrates how to change the appearance of a visualization via IronPython scripting. Lets take a Line chart as an example and the other charts would follow the similar approach. Listed down are the API references for the other visualization types.

    Introduction

    This sample articles demonstrates how to change the appearance of a visualization via IronPython scripting. Lets take a Line chart as an example and the other charts would follow the similar approach.  Listed down are the API references for the other visualization types.

    Code Sample

    # Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license.
    
    from Spotfire.Dxp.Application.Visuals import *
    #viz is a linechart visualization parameter
    vis = viz.As[LineChart]()
    
    #Changing LineWidth-Allowed values are 1-10
    vis.LineWidth=3
    
    #Changing Transparency -Valid values are in the range [0.0, 1.0]
    vis.Transparency=vis.Transparency+0.01
    
    vis.ShowMarkers=True
    #Changing MarkerSize -Allowed values are 1-100
    vis.MarkerSize=vis.MarkerSize+1
    
    #Other available Properties
    vis.SteppedLines=True
    vis.BreakOnEmpty=True
    vis.UseSeparateColorForMarkedItems = True
    vis.CompensateForMissingTimeSeriesValues=True
     

    Similarly, the Appearance can be changed for the other visualization plots. Here are the API references listed:

    Scatter plot

    Bar Chart

    Combination Chart

    Pie Chart

    Graphical Table

    Cross Table

    Map Chart

    3D Scatter Plot

    Parallel Co-ordinate Plot

    Box Plot

    References

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


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...