Fabio Ruggeri Posted October 30, 2020 Share Posted October 30, 2020 Hi, can you please tell me which are the ironpython commands to modify the cross table colors, as it is possible with Spotfire 10.10 I saw that the followingpage https://www.sf-ref.com/ironpython/visualizations/cross-table/colors/ will be written soon, but some months passed andI would need this functionality. Thanks Fabio Link to comment Share on other sites More sharing options...
Raghav Rajaram Posted November 22, 2020 Share Posted November 22, 2020 Hi, This is an old script to change colors of a crosstable. It should work fine, you have to play around with the setting to get to what you want but this would help you get started: from Spotfire.Dxp.Application.Visuals import CrossTablePlot,CategoryKey from Spotfire.Dxp.Application.Visuals.ConditionalColoring import ConditionValue from Spotfire.Dxp.Data import DataType from System.Drawing import Color vc = vis.As[CrossTablePlot]() coloring = vc.Colorings.AddNew("MyColorRule") coloring.DefaultColor = Color.White coloring.EmptyColor = Color.White coloring.AddThresholdColorRule(0,ConditionValue.CreateLiteral(100,DataType.Integer),Color.FromArgb(255,0,0)) categoryKey1 = CategoryKey("M1") categoryKey2 = CategoryKey("M2") vc.Colorings.AddMapping(categoryKey1, coloring) vc.Colorings.AddMapping(categoryKey2, coloring) Regards, Raghav Link to comment Share on other sites More sharing options...
Fabio Ruggeri Posted December 8, 2020 Author Share Posted December 8, 2020 Thanks Raghav, I tried to use this script, but I don't get how I can use it to change cross table header. I would need to know how I can style a header of a cross table individually and also its column values individually. This iswhat I can do with the functions implemented in Spotfire 10.10 (please see attached image), but I need to do that via ironpython (because cross table header can change dynamically). Thanks Fabio 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