Jump to content

Manually adjusting Cell Width disables IronPython CellWidth functionality


Recommended Posts

Version: Spotfire 11.4 IronPython 2.7.7

1. Start with crosstableplot

2. Manually adjust a single column using mouse to any size

3. Run IronPython script to adjust CellWidth

Observed Behavior: User adjusted column is excluded from IronPython script setting

Expected Behavior: All cell widths are adjusted by IronPython script

How do I make sure all cell widths are adjusted by IronPython script? Or clear user adjustments to table? I could not find any relevant functions in CrossTablePlot API or its parents.

Link to comment
Share on other sites

I found a function called AutoConfigure that seems to do the job of clearing the cell width, but I don't know if it potentially changes some other settings.
 

from Spotfire.Dxp.Application.Visuals import *

vis = vis.As[CrossTablePlot]()
vis.AutoConfigure()
vis.CellWidth = 200

 

Edited by Gaia Paolini
Link to comment
Share on other sites

Unfortunately AutoConfigure resets multiple settings.

I haven't check all that was reset by I've noticed so far custom expressions for axes, data limiting settings, colorby settings, and legend settings all get reset.

 

I think I will have to resolve this by deactivating user clicks through css.

Link to comment
Share on other sites

Reproducing or undoing /resetting all manual user actions programmatically might not be obvious, especially for this one performed on the visualization's rendering result.
The AutoConfigure() method is called when you create a new visualization, that's why if you apply it, it will behave as if you were creating a fresh one and therefore lose most of the settings.
May I suggest creating a script that will re-apply all the settings (custom expressions for axes, data limiting settings, color-by settings, and legend...) after the AutoConfigure() call?

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