Unable to use AddThresholdColorRule. It is giving error.

from Spotfire.Dxp.Application.Visuals import *
from Spotfire.Dxp.Application.Visuals.ConditionalColoring import *
from System.Drawing import Color

# Get the visualization reference
for visualization in Document.ActivePageReference.Visuals:
  if visualization.Title == "Test Bar Chart1":
    visualContentObject = visualization.As[VisualContent]()

#Clear default coloring
#set color
visualContentObject.ColorAxis.Coloring.AddThresholdColorRule(StringComparisonOperator.GreaterOrEqual, ConditionValue.CreateLiteral('40'), Color.FromName("Green"))

I have a string column in Value Axis which I want to conditionally color green for values greaterorequal than 40.I  have tried this code but it gives an error no attribute named GreaterOrEqual 

The script parameters that I have defined are visualization and visualContentObject both of them point to the bar chart in the visualization

(1) Answer