Change color used for empty values

from Spotfire.Dxp.Application.Visuals import ColorAxis, VisualContent
from System.Drawing import Color
#color is a string script parameter

#loop all visualizations
for p in Document.Pages:
   for v in p.Visuals: 
      v = v.As[VisualContent]()

      #change color if visualization has a ColorAxis attribute
      #see https://msdn.microsoft.com/en-us/library/aa358802.aspx for list of colors
      if hasattr(v,'ColorAxis'): v.ColorAxis.Coloring.EmptyColor = Color.FromName(color)




No comments: