Kevin Brogle Posted July 26, 2022 Share Posted July 26, 2022 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 More sharing options...
Gaia Paolini Posted July 27, 2022 Share Posted July 27, 2022 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 More sharing options...
Kevin Brogle Posted July 27, 2022 Author Share Posted July 27, 2022 Thank you Gaia. That worked.BTW, how do I print out values? Link to comment Share on other sites More sharing options...
Gaia Paolini Posted July 27, 2022 Share Posted July 27, 2022 I meant adding a print statement print(vis.LabelRenderer.GetType() )without trying to change the renderer, then executing the script with Run Script while you are editing it. That returned Spotfire.Dxp.Application.Visuals.ValueRenderers.BitmapValueRendererSettings. Link to comment Share on other sites More sharing options...
Kevin Brogle Posted July 27, 2022 Author Share Posted July 27, 2022 Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now