Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

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: