Steven Paynter Posted October 8, 2015 Share Posted October 8, 2015 Hello all, I am trying to build a coloring for a Table Chart from iron python code. So far I have been able to: 1. Create a "Color scheme grouping" 2. Add expression rules to the "Color scheme grouping" How would I add a column to the "Color scheme grouping" with iron python. Below is my current code for reference: from Spotfire.Dxp.Application.Visuals import TablePlot, CategoryKeyfrom Spotfire.Dxp.Application.Visuals.ConditionalColoring import ConditionValuefrom Spotfire.Dxp.Data import DataTypefrom System.Drawing import Color #clear any pre existing coloringsViz = selectTopicViz.As[TablePlot]()Viz.Colorings.Clear() #Set default coloring valuescoloring = Viz.Colorings.AddNew("TopicDetails")coloring.DefaultColor = Color.Whitecoloring.EmptyColor = Color.White #loop through list of names. each name should be colored greenfor name in range(0, len(list)): coloring.AddExpressionRule("[TS1_NAME]='"+list[name]+"'",Color.Green) #add coloring to VisualizationcategoryKey1 = CategoryKey("M1")Viz.Colorings.AddMapping(categoryKey1, coloring) Thanks, Steve Link to comment Share on other sites More sharing options...
Navjeet Singh 2 Posted September 20, 2018 Share Posted September 20, 2018 Hello, I am also looking for the similar thing. Did you able to figure out. Thanks, Navjeet Link to comment Share on other sites More sharing options...
Satyam Uppal Posted August 27, 2019 Share Posted August 27, 2019 Hi, I am also facing the same issue for Cross table (not able to create color rule using Iron Python) 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