Jump to content

How to set label renderer in IronPython for image from column


Kevin Brogle

Recommended Posts

I am writing IronPython scripts to allow the changing of marker labels through a property control. I have found the proper syntax to select DefaultRenderer, LinkRenderer, or ImageFromURLRenderer for SetLabelRenderer(ValueRendererTypeIdentifiers.[renderer]). However, How do I set the renderer if the image comes from a column, not a URL? If I use ImageFromURLRenderer it expects a URL and there isn't one. If I use DefaultRenderer it just says Binary. Manually, I just select Image from the dropdown.

TIA

Link to comment
Share on other sites

I found which value renderer to use by printing out the value of the current value renderer when it was manually set to Image.

Turns out to be a BitmapRenderer. So this script should work (vis is an input parameter for your visualization):

from Spotfire.Dxp.Application.Visuals import *

from Spotfire.Dxp.Application.Visuals.ValueRenderers import *

vis = vis .As[Visualization]()

myRenderer = vis .SetLabelRenderer( ValueRendererTypeIdentifiers.BitmapRenderer)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...