Jump to content
  • How to use IronPython in Spotfire® to render image from an URL on the X-axis


    This example illustrates how to use ironpython to change the X axis "Label rendering" in a visualization to render image from an URL.

    Introduction

    This example illustrates how to use ironpython to change the X axis "Label rendering" in a visualization to render image from an URL.

    Note - SetLevelSettings feature will only have effect on the following axes: Bar chart x axis, Line chart x axis, Combination Chart x axis, Scatter plot x and y axes and Heat map x and y axes, and Cross Table horizontal and vertical axes. For the Cross Table the size can not be set via this API. Instead use the setters for cell and header size avaiable on the Cross Table plot itself. For the case when the axis can be both continuous and categorical, the feature will only have effect when the axis is in categorical mode.

    Code sample

    # Copyright © 2017. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
    
    myVis.XAxis.ScaleLabels.SetLevelSettings("Region", ValueRendererTypeIdentifiers.ImageFromUrlRenderer);
    mySettings = myVis.XAxis.ScaleLabels["Region"].RendererSettings;
    mySettings.UrlTemplate="https://www.gstatic.com/webp/gallery3/2.png""
    
    myVis - script parameter referring to a BarChart visualization with "Region" set on the Categorical axis
     

    References

    License:  TIBCO BSD-Style License

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

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...