LEO TAE WOONG YOO 2 Posted August 13 Share Posted August 13 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 More sharing options...
Gaia Paolini Posted August 13 Share Posted August 13 (edited) I think I can reproduce your issue. Edited August 13 by Gaia Paolini Link to comment Share on other sites More sharing options...
Gaia Paolini Posted August 13 Share Posted August 13 (edited) 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 August 13 by Gaia Paolini Link to comment Share on other sites More sharing options...
LEO TAE WOONG YOO 2 Posted August 14 Author Share Posted August 14 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 More sharing options...
Olivier Keugue Tadaa Posted August 14 Share Posted August 14 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 More sharing options...
LEO TAE WOONG YOO 2 Posted August 16 Author Share Posted August 16 Thanks for suggestion but I wanted to avoid having to set all the parameters programmatically. I got feedback that setting vis.ColumnAxis.Expression to a different value and back to desired value clears user adjusted cell widths. 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