Changing Color of Empty Values in Cross Table using IronPython script

I'm using Cross Table. I'm passing the column Name via Document Property. I want to change the color of Empty Values in Cross Table to white using ironpython.

from Spotfire.Dxp.Application.Visuals import *

from Spotfire.Dxp.Application.Visuals.ConditionalColoring import *

from System.Drawing import Color

visualContentObject = vis.AsVisualContent

coloring = visualContentObject.Colorings.AddNew("RandNo Gradient")

colName = Document.Properties['columnName'] visualContentObject.Colorings.AddMapping(CategoryKey(colName), coloring)

colorRule = coloring.AddContinuousColorRule()

colorRule.IntervalMode = IntervalMode.Gradient colorRule.Breakpoints.Add(ConditionValue.CreateLiteral(1), Color.FromName("Green")) colorRule.Breakpoints.Add(ConditionValue.CreateLiteral(3), Color.FromName("White")) colorRule.Breakpoints.Add(ConditionValue.CreateLiteral(5), Color.FromName("Red"))

(1) Answer

Login